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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

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 comments Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/views/profiles/user_manager_view.h" 5 #include "chrome/browser/ui/views/profiles/user_manager_view.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 base::Closure* user_manager_shown_callback_for_testing_ = nullptr; 59 base::Closure* user_manager_shown_callback_for_testing_ = nullptr;
60 bool instance_under_construction_ = false; 60 bool instance_under_construction_ = false;
61 } // namespace 61 } // namespace
62 62
63 // ReauthDelegate--------------------------------------------------------------- 63 // ReauthDelegate---------------------------------------------------------------
64 64
65 ReauthDelegate::ReauthDelegate(UserManagerView* parent, 65 ReauthDelegate::ReauthDelegate(UserManagerView* parent,
66 views::WebView* web_view, 66 views::WebView* web_view,
67 const std::string& email_address, 67 const std::string& email_address,
68 signin_metrics::Reason reason) 68 signin_metrics::Reason reason)
69 : UserManager::ReauthDialogObserver(web_view->GetWebContents(), 69 : UserManager::BaseReauthDialogDelegate(web_view->GetWebContents()),
70 email_address),
71 parent_(parent), 70 parent_(parent),
72 web_view_(web_view), 71 web_view_(web_view),
73 email_address_(email_address) { 72 email_address_(email_address) {
74 AddChildView(web_view_); 73 AddChildView(web_view_);
75 SetLayoutManager(new views::FillLayout()); 74 SetLayoutManager(new views::FillLayout());
76 75
76 web_view->GetWebContents()->SetDelegate(this);
77
77 // Load the re-auth URL, prepopulated with the user's email address. 78 // Load the re-auth URL, prepopulated with the user's email address.
78 // Add the index of the profile to the URL so that the inline login page 79 // Add the index of the profile to the URL so that the inline login page
79 // knows which profile to load and update the credentials. 80 // knows which profile to load and update the credentials.
80 GURL url = signin::GetReauthURLWithEmail( 81 GURL url = signin::GetReauthURLWithEmail(
81 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, 82 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason,
82 email_address_); 83 email_address_);
83 web_view_->LoadInitialURL(url); 84 web_view_->LoadInitialURL(url);
84 } 85 }
85 86
86 ReauthDelegate::~ReauthDelegate() {} 87 ReauthDelegate::~ReauthDelegate() {}
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 // Now that the window is closed, we can allow a new one to be opened. 416 // Now that the window is closed, we can allow a new one to be opened.
416 // (WindowClosing comes in asynchronously from the call to Close() and we 417 // (WindowClosing comes in asynchronously from the call to Close() and we
417 // may have already opened a new instance). 418 // may have already opened a new instance).
418 if (instance_ == this) 419 if (instance_ == this)
419 instance_ = NULL; 420 instance_ = NULL;
420 } 421 }
421 422
422 bool UserManagerView::ShouldUseCustomFrame() const { 423 bool UserManagerView::ShouldUseCustomFrame() const {
423 return false; 424 return false;
424 } 425 }
OLDNEW
« chrome/browser/ui/user_manager.cc ('K') | « chrome/browser/ui/views/profiles/user_manager_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698