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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

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 | « no previous file | chrome/browser/ui/user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 23b140bfdca83935654a4d1fe6ed5573dba4f464..1ea51b21c51d54b625ec250a185354874bffd33a 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -141,24 +141,33 @@ class UserManagerWebContentsDelegate : public content::WebContentsDelegate {
}
};
-class ReauthDialogDelegate : public UserManager::ReauthDialogObserver,
- public UserManagerWebContentsDelegate,
+class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
public ConstrainedWindowMacDelegate {
public:
- ReauthDialogDelegate(content::WebContents* web_contents,
- const std::string& email)
- : UserManager::ReauthDialogObserver(web_contents, email) {}
+ ReauthDialogDelegate() {
+ hotKeysWebContentsDelegate_.reset(new UserManagerWebContentsDelegate());
+ }
- // UserManager::ReauthDialogObserver:
+ // UserManager::BaseReauthDialogDelegate:
void CloseReauthDialog() override {
CloseInstanceReauthDialog();
}
+ // WebContentsDelegate::HandleKeyboardEvent:
+ void HandleKeyboardEvent(
+ content::WebContents* source,
+ const content::NativeWebKeyboardEvent& event) override {
+ hotKeysWebContentsDelegate_->HandleKeyboardEvent(source, event);
+ }
+
// ConstrainedWindowMacDelegate:
void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override {
CloseReauthDialog();
}
+private:
+ std::unique_ptr<UserManagerWebContentsDelegate> hotKeysWebContentsDelegate_;
+
DISALLOW_COPY_AND_ASSIGN(ReauthDialogDelegate);
};
@@ -202,8 +211,7 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver,
reauthWebContents_.reset(content::WebContents::Create(
content::WebContents::CreateParams(profile)));
window.get().contentView = reauthWebContents_->GetNativeView();
- webContentsDelegate_.reset(
- new ReauthDialogDelegate(reauthWebContents_.get(), emailAddress_));
+ webContentsDelegate_.reset(new ReauthDialogDelegate());
reauthWebContents_->SetDelegate(webContentsDelegate_.get());
base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
« no previous file with comments | « no previous file | chrome/browser/ui/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698