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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm

Issue 1814513002: Fix sizing issues in the tab modal signin flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/cocoa/profiles/signin_view_controller_delegate_mac.h " 5 #include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h "
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
11 #include "chrome/browser/signin/signin_promo.h" 11 #include "chrome/browser/signin/signin_promo.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_s heet.h" 13 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_s heet.h"
14 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h" 14 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_w indow.h"
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" 15 #include "chrome/browser/ui/tabs/tab_strip_model.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "components/signin/core/common/profile_management_switches.h" 17 #include "components/signin/core/common/profile_management_switches.h"
18 #include "content/public/browser/render_widget_host_view.h" 18 #include "content/public/browser/render_widget_host_view.h"
19 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
20 20
21 namespace { 21 namespace {
22 22
23 // Dimensions of the web contents containing the old-style signin flow with the 23 // Dimensions of the web contents containing the old-style signin flow with the
24 // username and password challenge on the same form. 24 // username and password challenge on the same form.
25 const CGFloat kPasswordCombinedFixedGaiaViewHeight = 440; 25 const CGFloat kPasswordCombinedFixedGaiaViewHeight = 440;
26 const CGFloat kPasswordCombinedFixedGaiaViewWidth = 360; 26 const CGFloat kPasswordCombinedFixedGaiaViewWidth = 360;
27 27
28 // Dimensions of the tab-modal dialog displaying the password-separated signin 28 // Dimensions of the tab-modal dialog displaying the password-separated signin
29 // flow. These match the dimensions of the server content they display. 29 // flow. These match the dimensions of the server content they display.
30 const CGFloat kFixedGaiaViewHeight = 512; 30 const CGFloat kFixedGaiaViewHeight = 612;
31 const CGFloat kFixedGaiaViewWidth = 448; 31 const CGFloat kFixedGaiaViewWidth = 448;
32 32
33 // Dimensions of the sync confirmation tab-modal dialog. These are taken from 33 // Dimensions of the sync confirmation tab-modal dialog. These are taken from
34 // the design spec for this feature. 34 // the design spec for this feature.
35 const int kSyncConfirmationDialogWidth = 448; 35 const int kSyncConfirmationDialogWidth = 448;
36 const int kSyncConfirmationDialogHeight = 351; 36 const int kSyncConfirmationDialogHeight = 351;
37 37
38 } // namespace 38 } // namespace
39 39
40 SigninViewControllerDelegateMac::SigninViewControllerDelegateMac( 40 SigninViewControllerDelegateMac::SigninViewControllerDelegateMac(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 SigninViewController* signin_view_controller, 137 SigninViewController* signin_view_controller,
138 Browser* browser) { 138 Browser* browser) {
139 return new SigninViewControllerDelegateMac( 139 return new SigninViewControllerDelegateMac(
140 signin_view_controller, 140 signin_view_controller,
141 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents( 141 SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
142 browser->profile()), 142 browser->profile()),
143 browser->tab_strip_model()->GetActiveWebContents(), 143 browser->tab_strip_model()->GetActiveWebContents(),
144 NSMakeRect(0, 0, kSyncConfirmationDialogWidth, 144 NSMakeRect(0, 0, kSyncConfirmationDialogWidth,
145 kSyncConfirmationDialogHeight)); 145 kSyncConfirmationDialogHeight));
146 } 146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698