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

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

Issue 2064233002: MD User Manager: Larger dimensions for the password-separated reauth dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/user_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/lifetime/keep_alive_types.h" 12 #include "chrome/browser/lifetime/keep_alive_types.h"
13 #include "chrome/browser/lifetime/scoped_keep_alive.h" 13 #include "chrome/browser/lifetime/scoped_keep_alive.h"
14 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 14 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
15 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/profiles/profile_metrics.h" 16 #include "chrome/browser/profiles/profile_metrics.h"
17 #include "chrome/browser/profiles/profile_window.h" 17 #include "chrome/browser/profiles/profile_window.h"
18 #include "chrome/browser/profiles/profiles_state.h" 18 #include "chrome/browser/profiles/profiles_state.h"
19 #include "chrome/browser/signin/signin_promo.h" 19 #include "chrome/browser/signin/signin_promo.h"
20 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
21 #include "chrome/browser/ui/browser_dialogs.h" 21 #include "chrome/browser/ui/browser_dialogs.h"
22 #include "chrome/browser/ui/browser_finder.h" 22 #include "chrome/browser/ui/browser_finder.h"
23 #include "chrome/browser/ui/browser_window.h" 23 #include "chrome/browser/ui/browser_window.h"
24 #include "chrome/browser/ui/user_manager.h" 24 #include "chrome/browser/ui/user_manager.h"
25 #include "chrome/grit/chromium_strings.h" 25 #include "chrome/grit/chromium_strings.h"
26 #include "chrome/grit/generated_resources.h" 26 #include "chrome/grit/generated_resources.h"
27 #include "components/guest_view/browser/guest_view_manager.h" 27 #include "components/guest_view/browser/guest_view_manager.h"
28 #include "components/signin/core/common/profile_management_switches.h"
28 #include "content/public/browser/navigation_details.h" 29 #include "content/public/browser/navigation_details.h"
29 #include "content/public/browser/render_widget_host_view.h" 30 #include "content/public/browser/render_widget_host_view.h"
30 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
31 #include "google_apis/gaia/gaia_urls.h" 32 #include "google_apis/gaia/gaia_urls.h"
32 #include "ui/base/l10n/l10n_util.h" 33 #include "ui/base/l10n/l10n_util.h"
33 #include "ui/display/display.h" 34 #include "ui/display/display.h"
34 #include "ui/display/screen.h" 35 #include "ui/display/screen.h"
35 #include "ui/views/controls/webview/webview.h" 36 #include "ui/views/controls/webview/webview.h"
36 #include "ui/views/layout/fill_layout.h" 37 #include "ui/views/layout/fill_layout.h"
37 #include "ui/views/view.h" 38 #include "ui/views/view.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // knows which profile to load and update the credentials. 79 // knows which profile to load and update the credentials.
79 GURL url = signin::GetReauthURLWithEmail( 80 GURL url = signin::GetReauthURLWithEmail(
80 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, 81 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason,
81 email_address_); 82 email_address_);
82 web_view_->LoadInitialURL(url); 83 web_view_->LoadInitialURL(url);
83 } 84 }
84 85
85 ReauthDelegate::~ReauthDelegate() {} 86 ReauthDelegate::~ReauthDelegate() {}
86 87
87 gfx::Size ReauthDelegate::GetPreferredSize() const { 88 gfx::Size ReauthDelegate::GetPreferredSize() const {
88 return gfx::Size(UserManager::kReauthDialogWidth, 89 return switches::UsePasswordSeparatedSigninFlow() ?
89 UserManager::kReauthDialogHeight); 90 gfx::Size(UserManager::kReauthDialogWidth,
91 UserManager::kReauthDialogHeight) :
92 gfx::Size(UserManager::kPasswordCombinedReauthDialogWidth,
93 UserManager::kPasswordCombinedReauthDialogHeight);
90 } 94 }
91 95
92 bool ReauthDelegate::CanResize() const { 96 bool ReauthDelegate::CanResize() const {
93 return true; 97 return true;
94 } 98 }
95 99
96 bool ReauthDelegate::CanMaximize() const { 100 bool ReauthDelegate::CanMaximize() const {
97 return true; 101 return true;
98 } 102 }
99 103
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // Now that the window is closed, we can allow a new one to be opened. 413 // Now that the window is closed, we can allow a new one to be opened.
410 // (WindowClosing comes in asynchronously from the call to Close() and we 414 // (WindowClosing comes in asynchronously from the call to Close() and we
411 // may have already opened a new instance). 415 // may have already opened a new instance).
412 if (instance_ == this) 416 if (instance_ == this)
413 instance_ = NULL; 417 instance_ = NULL;
414 } 418 }
415 419
416 bool UserManagerView::ShouldUseCustomFrame() const { 420 bool UserManagerView::ShouldUseCustomFrame() const {
417 return false; 421 return false;
418 } 422 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/user_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698