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

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_dialog.h

Issue 1001723002: media: Refactor PlatformVerificationFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/attestation/platform_verification_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/attestation/platform_verification_dialog.h
diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.h b/chrome/browser/chromeos/attestation/platform_verification_dialog.h
index 50aef91bbaf132b8c368b918259f8ac41e2b1c7f..29675061c4aa5434b2e6f26414af896d74b3a44e 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.h
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.h
@@ -8,7 +8,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
-#include "chrome/browser/chromeos/attestation/platform_verification_flow.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/views/controls/styled_label_listener.h"
#include "ui/views/window/dialog_delegate.h"
@@ -25,23 +24,29 @@ class PlatformVerificationDialog : public views::DialogDelegateView,
public views::StyledLabelListener,
public content::WebContentsObserver {
public:
+ enum ConsentResponse {
+ CONSENT_RESPONSE_NONE,
+ CONSENT_RESPONSE_ALLOW,
+ CONSENT_RESPONSE_DENY
+ };
+
+ using ConsentCallback = base::Callback<void(ConsentResponse response)>;
+
// Initializes a tab-modal dialog for |web_contents| and |requesting_origin|
// and shows it. Returns a non-owning pointer to the widget so that caller can
// close the dialog and cancel the request. The returned widget is only
// guaranteed to be valid before |callback| is called.
- static views::Widget* ShowDialog(
- content::WebContents* web_contents,
- const GURL& requesting_origin,
- const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
+ static views::Widget* ShowDialog(content::WebContents* web_contents,
+ const GURL& requesting_origin,
+ const ConsentCallback& callback);
protected:
~PlatformVerificationDialog() override;
private:
- PlatformVerificationDialog(
- content::WebContents* web_contents,
- const base::string16& domain,
- const PlatformVerificationFlow::Delegate::ConsentCallback& callback);
+ PlatformVerificationDialog(content::WebContents* web_contents,
+ const base::string16& domain,
+ const ConsentCallback& callback);
// views::DialogDelegate:
bool Cancel() override;
@@ -65,7 +70,7 @@ class PlatformVerificationDialog : public views::DialogDelegateView,
content::NavigationController::ReloadType reload_type) override;
base::string16 domain_;
- PlatformVerificationFlow::Delegate::ConsentCallback callback_;
+ ConsentCallback callback_;
DISALLOW_COPY_AND_ASSIGN(PlatformVerificationDialog);
};
« 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