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

Side by Side Diff: ash/shell/lock_view.cc

Issue 1977353002: Views: Remove reduntant Button::ConfigureDefaultFocus calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@other_fk_regression
Patch Set: Created 4 years, 7 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 | « no previous file | chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/session/session_state_delegate.h" 5 #include "ash/session/session_state_delegate.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/shell/example_factory.h" 7 #include "ash/shell/example_factory.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 12 matching lines...) Expand all
23 namespace ash { 23 namespace ash {
24 namespace shell { 24 namespace shell {
25 25
26 class LockView : public views::WidgetDelegateView, 26 class LockView : public views::WidgetDelegateView,
27 public views::ButtonListener { 27 public views::ButtonListener {
28 public: 28 public:
29 LockView() : unlock_button_(new views::LabelButton( 29 LockView() : unlock_button_(new views::LabelButton(
30 this, base::ASCIIToUTF16("Unlock"))) { 30 this, base::ASCIIToUTF16("Unlock"))) {
31 unlock_button_->SetStyle(views::Button::STYLE_BUTTON); 31 unlock_button_->SetStyle(views::Button::STYLE_BUTTON);
32 AddChildView(unlock_button_); 32 AddChildView(unlock_button_);
33 views::Button::ConfigureDefaultFocus(unlock_button_);
34 unlock_button_->set_request_focus_on_press(true);
35 } 33 }
36 ~LockView() override {} 34 ~LockView() override {}
37 35
38 // Overridden from views::View: 36 // Overridden from views::View:
39 gfx::Size GetPreferredSize() const override { return gfx::Size(500, 400); } 37 gfx::Size GetPreferredSize() const override { return gfx::Size(500, 400); }
40 38
41 private: 39 private:
42 // Overridden from views::View: 40 // Overridden from views::View:
43 void OnPaint(gfx::Canvas* canvas) override { 41 void OnPaint(gfx::Canvas* canvas) override {
44 canvas->FillRect(GetLocalBounds(), SK_ColorYELLOW); 42 canvas->FillRect(GetLocalBounds(), SK_ColorYELLOW);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 widget->GetNativeView()->SetName("LockView"); 98 widget->GetNativeView()->SetName("LockView");
101 widget->GetNativeView()->Focus(); 99 widget->GetNativeView()->Focus();
102 100
103 // TODO: it shouldn't be necessary to invoke UpdateTooltip() here. 101 // TODO: it shouldn't be necessary to invoke UpdateTooltip() here.
104 Shell::GetInstance()->tooltip_controller()->UpdateTooltip( 102 Shell::GetInstance()->tooltip_controller()->UpdateTooltip(
105 widget->GetNativeView()); 103 widget->GetNativeView());
106 } 104 }
107 105
108 } // namespace shell 106 } // namespace shell
109 } // namespace ash 107 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698