Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_dialog.h

Issue 236203017: Fixes the crash for "learn more" link of the dialog for v2 apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/attestation/platform_verification_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_ 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" 11 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h"
12 #include "ui/views/controls/styled_label_listener.h" 12 #include "ui/views/controls/styled_label_listener.h"
13 #include "ui/views/window/dialog_delegate.h" 13 #include "ui/views/window/dialog_delegate.h"
14 14
15 class Browser;
16
17 namespace content { 15 namespace content {
18 class WebContents; 16 class WebContents;
19 } 17 }
20 18
21 namespace chromeos { 19 namespace chromeos {
22 namespace attestation { 20 namespace attestation {
23 21
24 // A tab-modal dialog UI to ask the user for PlatformVerificationFlow. 22 // A tab-modal dialog UI to ask the user for PlatformVerificationFlow.
25 class PlatformVerificationDialog : public views::DialogDelegateView, 23 class PlatformVerificationDialog : public views::DialogDelegateView,
26 public views::StyledLabelListener { 24 public views::StyledLabelListener {
27 public: 25 public:
28 // Initializes a tab-modal dialog for |web_contents| and shows it. 26 // Initializes a tab-modal dialog for |web_contents| and shows it.
29 static void ShowDialog( 27 static void ShowDialog(
30 content::WebContents* web_contents, 28 content::WebContents* web_contents,
31 const PlatformVerificationFlow::Delegate::ConsentCallback& callback); 29 const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
32 30
33 protected: 31 protected:
34 virtual ~PlatformVerificationDialog(); 32 virtual ~PlatformVerificationDialog();
35 33
36 private: 34 private:
37 PlatformVerificationDialog( 35 PlatformVerificationDialog(
38 Browser* browser, 36 content::WebContents* web_contents,
39 const base::string16& domain, 37 const base::string16& domain,
40 const PlatformVerificationFlow::Delegate::ConsentCallback& callback); 38 const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
41 39
42 // Overridden from views::DialogDelegate: 40 // Overridden from views::DialogDelegate:
43 virtual bool Cancel() OVERRIDE; 41 virtual bool Cancel() OVERRIDE;
44 virtual bool Accept() OVERRIDE; 42 virtual bool Accept() OVERRIDE;
45 virtual bool Close() OVERRIDE; 43 virtual bool Close() OVERRIDE;
46 virtual base::string16 GetDialogButtonLabel( 44 virtual base::string16 GetDialogButtonLabel(
47 ui::DialogButton button) const OVERRIDE; 45 ui::DialogButton button) const OVERRIDE;
48 46
49 // Overridden from views::WidgetDelegate: 47 // Overridden from views::WidgetDelegate:
50 virtual ui::ModalType GetModalType() const OVERRIDE; 48 virtual ui::ModalType GetModalType() const OVERRIDE;
51 49
52 // Overridden from views::View: 50 // Overridden from views::View:
53 virtual gfx::Size GetPreferredSize() OVERRIDE; 51 virtual gfx::Size GetPreferredSize() OVERRIDE;
54 52
55 // Overridden from views::StyledLabelListener: 53 // Overridden from views::StyledLabelListener:
56 virtual void StyledLabelLinkClicked(const gfx::Range& range, 54 virtual void StyledLabelLinkClicked(const gfx::Range& range,
57 int event_flags) OVERRIDE; 55 int event_flags) OVERRIDE;
58 56
59 Browser* browser_; 57 content::WebContents* web_contents_;
60 base::string16 domain_; 58 base::string16 domain_;
61 PlatformVerificationFlow::Delegate::ConsentCallback callback_; 59 PlatformVerificationFlow::Delegate::ConsentCallback callback_;
62 60
63 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog); 61 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog);
64 }; 62 };
65 63
66 } // namespace attestation 64 } // namespace attestation
67 } // namespace chromeos 65 } // namespace chromeos
68 66
69 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_ 67 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/attestation/platform_verification_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698