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

Unified Diff: chrome/browser/ui/signin_view_controller_delegate.cc

Issue 2093563003: Disable the Context Menu in the tab-modal signin dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder functions to match header file order. Created 4 years, 6 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/signin_view_controller_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/signin_view_controller_delegate.cc
diff --git a/chrome/browser/ui/signin_view_controller_delegate.cc b/chrome/browser/ui/signin_view_controller_delegate.cc
index 00f70601746977957dfb1be06bd6b0d826382a17..d21ef347bf4488646e0d95a3967267a38e3b5588 100644
--- a/chrome/browser/ui/signin_view_controller_delegate.cc
+++ b/chrome/browser/ui/signin_view_controller_delegate.cc
@@ -34,6 +34,21 @@ void SigninViewControllerDelegate::CloseModalSignin() {
PerformClose();
}
+void SigninViewControllerDelegate::PerformNavigation() {
+ if (CanGoBack(web_contents_)) {
+ auto auth_web_contents = GetAuthFrameWebContents(web_contents_);
+ auth_web_contents->GetController().GoBack();
+ } else {
+ CloseModalSignin();
+ }
+}
+
+bool SigninViewControllerDelegate::HandleContextMenu(
+ const content::ContextMenuParams& params) {
+ // Discard the context menu
+ return true;
+}
+
void SigninViewControllerDelegate::ResetSigninViewControllerDelegate() {
if (signin_view_controller_) {
signin_view_controller_->ResetModalSigninDelegate();
@@ -41,12 +56,6 @@ void SigninViewControllerDelegate::ResetSigninViewControllerDelegate() {
}
}
-bool SigninViewControllerDelegate::CanGoBack(
- content::WebContents* web_ui_web_contents) const {
- auto auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents);
- return auth_web_contents && auth_web_contents->GetController().CanGoBack();
-}
-
// content::WebContentsDelegate
void SigninViewControllerDelegate::LoadingStateChanged(
content::WebContents* source,
@@ -59,11 +68,8 @@ void SigninViewControllerDelegate::LoadingStateChanged(
"inline.login.showCloseButton");
}
-void SigninViewControllerDelegate::PerformNavigation() {
- if (CanGoBack(web_contents_)) {
- auto auth_web_contents = GetAuthFrameWebContents(web_contents_);
- auth_web_contents->GetController().GoBack();
- } else {
- CloseModalSignin();
- }
+bool SigninViewControllerDelegate::CanGoBack(
+ content::WebContents* web_ui_web_contents) const {
+ auto auth_web_contents = GetAuthFrameWebContents(web_ui_web_contents);
+ return auth_web_contents && auth_web_contents->GetController().CanGoBack();
}
« no previous file with comments | « chrome/browser/ui/signin_view_controller_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698