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

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

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix FocusManagerTest.StoreFocusedView Created 4 years, 10 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/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/navigation_controller.h" 16 #include "content/public/browser/navigation_controller.h"
17 #include "content/public/browser/render_widget_host_view.h" 17 #include "content/public/browser/render_widget_host_view.h"
18 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
19 #include "ui/gfx/paint_vector_icon.h" 19 #include "ui/gfx/paint_vector_icon.h"
20 #include "ui/gfx/vector_icons.h" 20 #include "ui/gfx/vector_icons.h"
21 #include "ui/views/controls/webview/webview.h" 21 #include "ui/views/controls/webview/webview.h"
22 #include "ui/views/layout/fill_layout.h" 22 #include "ui/views/layout/fill_layout.h"
23 #include "ui/views/style/platform_style.h"
23 #include "ui/views/widget/widget.h" 24 #include "ui/views/widget/widget.h"
24 #include "ui/views/widget/widget_delegate.h" 25 #include "ui/views/widget/widget_delegate.h"
25 26
26 const int kPasswordCombinedFixedGaiaViewHeight = 440; 27 const int kPasswordCombinedFixedGaiaViewHeight = 440;
27 const int kPasswordCombinedFixedGaiaViewWidth = 360; 28 const int kPasswordCombinedFixedGaiaViewWidth = 360;
28 const int kFixedGaiaViewHeight = 512; 29 const int kFixedGaiaViewHeight = 512;
29 const int kFixedGaiaViewWidth = 448; 30 const int kFixedGaiaViewWidth = 448;
30 const int kNavigationButtonSize = 16; 31 const int kNavigationButtonSize = 16;
31 const int kNavigationButtonOffset = 16; 32 const int kNavigationButtonOffset = 16;
32 const int kSyncConfirmationDialogWidth = 448; 33 const int kSyncConfirmationDialogWidth = 448;
33 const int kSyncConfirmationDialogHeight = 351; 34 const int kSyncConfirmationDialogHeight = 351;
34 35
35 // View that contains the signin web contents and the back/close overlay button. 36 // View that contains the signin web contents and the back/close overlay button.
36 class HostView : public views::View { 37 class HostView : public views::View {
37 public: 38 public:
38 HostView(views::View* contents, views::ButtonListener* button_listener) 39 HostView(views::View* contents, views::ButtonListener* button_listener)
39 : contents_(contents), 40 : contents_(contents),
40 back_button_(new views::ImageButton(button_listener)) { 41 back_button_(new views::ImageButton(button_listener)) {
41 back_button_->SetImageAlignment(views::ImageButton::ALIGN_LEFT, 42 back_button_->SetImageAlignment(views::ImageButton::ALIGN_LEFT,
42 views::ImageButton::ALIGN_MIDDLE); 43 views::ImageButton::ALIGN_MIDDLE);
43 back_button_->SetFocusable(true); 44 views::PlatformStyle::SetControlStyleFocus(back_button_);
44 ShowCloseButton(); 45 ShowCloseButton();
45 AddChildView(contents_); 46 AddChildView(contents_);
46 SetLayoutManager(new views::FillLayout); 47 SetLayoutManager(new views::FillLayout);
47 } 48 }
48 49
49 gfx::Size GetPreferredSize() const override { 50 gfx::Size GetPreferredSize() const override {
50 return contents_->GetPreferredSize(); 51 return contents_->GetPreferredSize();
51 } 52 }
52 53
53 void ShowCloseButton() { 54 void ShowCloseButton() {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 SigninViewControllerDelegate* 213 SigninViewControllerDelegate*
213 SigninViewControllerDelegate::CreateSyncConfirmationDelegate( 214 SigninViewControllerDelegate::CreateSyncConfirmationDelegate(
214 SigninViewController* signin_view_controller, 215 SigninViewController* signin_view_controller,
215 Browser* browser) { 216 Browser* browser) {
216 return new SigninViewControllerDelegateViews( 217 return new SigninViewControllerDelegateViews(
217 signin_view_controller, 218 signin_view_controller,
218 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView( 219 SigninViewControllerDelegateViews::CreateSyncConfirmationWebView(
219 browser->profile()), 220 browser->profile()),
220 browser); 221 browser);
221 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698