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

Side by Side Diff: chrome/browser/chromeos/views/dropdown_button.cc

Issue 8964001: views: Convert IsFocusable() to just focusable() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't need to override IsFocusableInRootView in omnibox_view_views Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/views/dropdown_button.h" 5 #include "chrome/browser/chromeos/views/dropdown_button.h"
6 6
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/gfx/canvas_skia.h" 9 #include "ui/gfx/canvas_skia.h"
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 views::ViewMenuDelegate* menu_delegate, 64 views::ViewMenuDelegate* menu_delegate,
65 bool show_menu_marker) 65 bool show_menu_marker)
66 : MenuButton(listener, text, menu_delegate, show_menu_marker) { 66 : MenuButton(listener, text, menu_delegate, show_menu_marker) {
67 set_border(new DropDownButtonBorder); 67 set_border(new DropDownButtonBorder);
68 } 68 }
69 69
70 DropDownButton::~DropDownButton() { 70 DropDownButton::~DropDownButton() {
71 } 71 }
72 72
73 void DropDownButton::OnPaintFocusBorder(gfx::Canvas* canvas) { 73 void DropDownButton::OnPaintFocusBorder(gfx::Canvas* canvas) {
74 if (HasFocus() && (IsFocusable() || IsAccessibilityFocusableInRootView())) { 74 if (HasFocus() && (focusable() || IsAccessibilityFocusableInRootView())) {
75 canvas->DrawFocusRect(gfx::Rect(kFocusFrameLeftOffset, kFocusFrameTopOffset, 75 canvas->DrawFocusRect(gfx::Rect(kFocusFrameLeftOffset, kFocusFrameTopOffset,
76 width() - kFocusFrameRightOffset, 76 width() - kFocusFrameRightOffset,
77 height() - kFocusFrameBottomOffset)); 77 height() - kFocusFrameBottomOffset));
78 } 78 }
79 } 79 }
80 80
81 void DropDownButton::SetText(const string16& text) { 81 void DropDownButton::SetText(const string16& text) {
82 text_ = text; 82 text_ = text;
83 UpdateTextSize(); 83 UpdateTextSize();
84 } 84 }
85 85
86 string16 DropDownButton::GetAccessibleValue() { 86 string16 DropDownButton::GetAccessibleValue() {
87 return text_; 87 return text_;
88 } 88 }
89 89
90 } // namespace chromeos 90 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698