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

Unified Diff: chrome/browser/ui/user_manager.h

Issue 2168953002: Disables the context menu in User Manager's reauth dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 4 years, 4 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 | « chrome/browser/ui/cocoa/profiles/user_manager_mac.mm ('k') | chrome/browser/ui/user_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/user_manager.h
diff --git a/chrome/browser/ui/user_manager.h b/chrome/browser/ui/user_manager.h
index 614e5c6dac01f43e458e08ae94ce7ae2517a14da..e6d2d349beb89422174052ab254aecdb517016af 100644
--- a/chrome/browser/ui/user_manager.h
+++ b/chrome/browser/ui/user_manager.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "chrome/browser/profiles/profile_window.h"
#include "components/signin/core/browser/signin_metrics.h"
+#include "content/public/browser/web_contents_delegate.h"
namespace base {
class FilePath;
@@ -69,24 +70,27 @@ class UserManager {
static const int kReauthDialogHeight = 512;
static const int kReauthDialogWidth = 448;
- // This class observes the WebUI used in the UserManager to perform online
- // reauthentication of locked profiles. It is concretely implemented in
- // UserManagerMac and UserManagerView to specialize the closing of the UI's
- // dialog widget.
- class ReauthDialogObserver : public content::WebContentsObserver {
+ // Abstract base class for performing online reauthentication of profiles in
+ // the User Manager. It is concretely implemented in UserManagerMac and
+ // UserManagerView to specialize the closing of the UI's dialog widgets.
+ class BaseReauthDialogDelegate : public content::WebContentsDelegate {
public:
- ReauthDialogObserver(content::WebContents* web_contents,
- const std::string& email_address);
+ BaseReauthDialogDelegate();
- private:
- // content::WebContentsObserver:
- void DidStopLoading() override;
+ // content::WebContentsDelegate:
+ bool HandleContextMenu(const content::ContextMenuParams& params) override;
+
+ // content::WebContentsDelegate:
+ void LoadingStateChanged(content::WebContents* source,
+ bool to_different_document) override;
+ private:
virtual void CloseReauthDialog() = 0;
- const std::string email_address_;
+ // WebContents of the embedded WebView.
+ content::WebContents* guest_web_contents_;
- DISALLOW_COPY_AND_ASSIGN(ReauthDialogObserver);
+ DISALLOW_COPY_AND_ASSIGN(BaseReauthDialogDelegate);
};
private:
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/user_manager_mac.mm ('k') | chrome/browser/ui/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698