#ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
#define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
#include "chrome/browser/chromeos/attestation/platform_verification_flow.h"
#include "ui/views/controls/styled_label_listener.h"
#include "ui/views/window/dialog_delegate.h"
class Browser;
namespace content {
class WebContents;
}
namespace chromeos {
namespace attestation {
class PlatformVerificationDialog : public views::DialogDelegateView,
public views::StyledLabelListener {
public:
static void ShowDialog(
content::WebContents* web_contents,
const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
protected:
virtual ~PlatformVerificationDialog();
private:
PlatformVerificationDialog(
Browser* browser,
const base::string16& domain,
const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
virtual bool Cancel() OVERRIDE;
virtual bool Accept() OVERRIDE;
virtual bool Close() OVERRIDE;
virtual base::string16 GetDialogButtonLabel(
ui::DialogButton button) const OVERRIDE;
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void StyledLabelLinkClicked(const gfx::Range& range,
int event_flags) OVERRIDE;
Browser* browser_;
base::string16 domain_;
PlatformVerificationFlow::Delegate::ConsentCallback callback_;
DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog);
};
}
}
#endif