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

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

Issue 881983003: media: Invoke PlatformVerificationDialog from ProtectedMediaIdentifierPermissionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
13 #include "ui/views/controls/styled_label_listener.h" 13 #include "ui/views/controls/styled_label_listener.h"
14 #include "ui/views/window/dialog_delegate.h" 14 #include "ui/views/window/dialog_delegate.h"
15 15
16 namespace content { 16 namespace content {
17 class WebContents; 17 class WebContents;
18 } 18 }
19 19
20 namespace chromeos { 20 namespace chromeos {
21 namespace attestation { 21 namespace attestation {
22 22
23 // A tab-modal dialog UI to ask the user for PlatformVerificationFlow. 23 // A tab-modal dialog UI to ask the user for PlatformVerificationFlow.
24 class PlatformVerificationDialog : public views::DialogDelegateView, 24 class PlatformVerificationDialog : public views::DialogDelegateView,
25 public views::StyledLabelListener, 25 public views::StyledLabelListener,
26 public content::WebContentsObserver { 26 public content::WebContentsObserver {
27 public: 27 public:
28 // Initializes a tab-modal dialog for |web_contents| and shows it. 28 // Initializes a tab-modal dialog for |web_contents| and shows it.
29 static void ShowDialog( 29 // Returns a non-owning pointer to the widget so that caller can close the
30 // dialog and cancel the request. The returned widget is only guaranteed to be
31 // valid before |callback| is returned.
ddorwin 2015/02/05 02:23:23 s/returned/called/?
xhwang 2015/02/05 02:49:34 Done.
32 static views::Widget* ShowDialog(
30 content::WebContents* web_contents, 33 content::WebContents* web_contents,
34 const GURL& requesting_origin,
31 const PlatformVerificationFlow::Delegate::ConsentCallback& callback); 35 const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
32 36
33 protected: 37 protected:
34 ~PlatformVerificationDialog() override; 38 ~PlatformVerificationDialog() override;
35 39
36 private: 40 private:
37 PlatformVerificationDialog( 41 PlatformVerificationDialog(
38 content::WebContents* web_contents, 42 content::WebContents* web_contents,
39 const base::string16& domain, 43 const base::string16& domain,
40 const PlatformVerificationFlow::Delegate::ConsentCallback& callback); 44 const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
(...skipping 22 matching lines...) Expand all
63 base::string16 domain_; 67 base::string16 domain_;
64 PlatformVerificationFlow::Delegate::ConsentCallback callback_; 68 PlatformVerificationFlow::Delegate::ConsentCallback callback_;
65 69
66 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog); 70 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog);
67 }; 71 };
68 72
69 } // namespace attestation 73 } // namespace attestation
70 } // namespace chromeos 74 } // namespace chromeos
71 75
72 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_ 76 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698