Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/views/profiles/signin_view_controller_delegate_views .h" | 5 #include "chrome/browser/ui/views/profiles/signin_view_controller_delegate_views .h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
| 10 #include "chrome/browser/signin/signin_promo.h" | 10 #include "chrome/browser/signin/signin_promo.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "components/constrained_window/constrained_window_views.h" | 14 #include "components/constrained_window/constrained_window_views.h" |
| 15 #include "components/signin/core/common/profile_management_switches.h" | 15 #include "components/signin/core/common/profile_management_switches.h" |
| 16 #include "content/public/browser/render_widget_host_view.h" | 16 #include "content/public/browser/render_widget_host_view.h" |
| 17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 #include "ui/views/controls/webview/webview.h" | 18 #include "ui/views/controls/webview/webview.h" |
| 19 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 20 | 20 |
| 21 const int kPasswordCombinedFixedGaiaViewHeight = 440; | 21 const int kPasswordCombinedFixedGaiaViewHeight = 440; |
| 22 const int kPasswordCombinedFixedGaiaViewWidth = 360; | 22 const int kPasswordCombinedFixedGaiaViewWidth = 360; |
| 23 const int kFixedGaiaViewHeight = 512; | 23 const int kFixedGaiaViewHeight = 512; |
| 24 const int kFixedGaiaViewWidth = 448; | 24 const int kFixedGaiaViewWidth = 448; |
| 25 const int kSyncConfirmationDialogWidth = 448; | 25 const int kSyncConfirmationDialogWidth = 448; |
| 26 const int kSyncConfirmationDialogHeight = 351; | 26 const int kSyncConfirmationDialogHeight = 511; |
|
Dan Beam
2016/04/04 23:48:38
i think hardcoded heights based on localized, dyna
Moe
2016/04/05 17:14:42
anthonyvd@ is working on a fix to make these dynam
| |
| 27 | 27 |
| 28 SigninViewControllerDelegateViews::SigninViewControllerDelegateViews( | 28 SigninViewControllerDelegateViews::SigninViewControllerDelegateViews( |
| 29 SigninViewController* signin_view_controller, | 29 SigninViewController* signin_view_controller, |
| 30 views::WebView* content_view, | 30 views::WebView* content_view, |
| 31 Browser* browser) | 31 Browser* browser) |
| 32 : SigninViewControllerDelegate(signin_view_controller, | 32 : SigninViewControllerDelegate(signin_view_controller, |
| 33 content_view->GetWebContents()), | 33 content_view->GetWebContents()), |
| 34 content_view_(content_view), | 34 content_view_(content_view), |
| 35 modal_signin_widget_(nullptr) { | 35 modal_signin_widget_(nullptr) { |
| 36 modal_signin_widget_ = constrained_window::ShowWebModalDialogViews( | 36 modal_signin_widget_ = constrained_window::ShowWebModalDialogViews( |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 SigninViewControllerDelegate* | 131 SigninViewControllerDelegate* |
| 132 SigninViewControllerDelegate::CreateSyncConfirmationDelegate( | 132 SigninViewControllerDelegate::CreateSyncConfirmationDelegate( |
| 133 SigninViewController* signin_view_controller, | 133 SigninViewController* signin_view_controller, |
| 134 Browser* browser) { | 134 Browser* browser) { |
| 135 return new SigninViewControllerDelegateViews( | 135 return new SigninViewControllerDelegateViews( |
| 136 signin_view_controller, | 136 signin_view_controller, |
| 137 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView( | 137 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView( |
| 138 browser->profile()), | 138 browser->profile()), |
| 139 browser); | 139 browser); |
| 140 } | 140 } |
| OLD | NEW |