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

Side by Side Diff: views/controls/button/text_button.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month 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 | « views/controls/button/custom_button.cc ('k') | views/controls/combobox/native_combobox_views.h » ('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 "views/controls/button/text_button.h" 5 #include "views/controls/button/text_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 298
299 TextButtonBase::~TextButtonBase() { 299 TextButtonBase::~TextButtonBase() {
300 } 300 }
301 301
302 void TextButtonBase::SetIsDefault(bool is_default) { 302 void TextButtonBase::SetIsDefault(bool is_default) {
303 if (is_default == is_default_) 303 if (is_default == is_default_)
304 return; 304 return;
305 is_default_ = is_default; 305 is_default_ = is_default;
306 if (is_default_) 306 if (is_default_)
307 AddAccelerator(Accelerator(ui::VKEY_RETURN, false, false, false)); 307 AddAccelerator(ui::Accelerator(ui::VKEY_RETURN, false, false, false));
308 else 308 else
309 RemoveAccelerator(Accelerator(ui::VKEY_RETURN, false, false, false)); 309 RemoveAccelerator(ui::Accelerator(ui::VKEY_RETURN, false, false, false));
310 SchedulePaint(); 310 SchedulePaint();
311 } 311 }
312 312
313 void TextButtonBase::SetText(const string16& text) { 313 void TextButtonBase::SetText(const string16& text) {
314 text_ = text; 314 text_ = text;
315 SetAccessibleName(text); 315 SetAccessibleName(text);
316 UpdateTextSize(); 316 UpdateTextSize();
317 } 317 }
318 318
319 void TextButtonBase::SetFont(const gfx::Font& font) { 319 void TextButtonBase::SetFont(const gfx::Font& font) {
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 #endif 851 #endif
852 } 852 }
853 853
854 void NativeTextButton::GetExtraParams( 854 void NativeTextButton::GetExtraParams(
855 gfx::NativeTheme::ExtraParams* params) const { 855 gfx::NativeTheme::ExtraParams* params) const {
856 TextButton::GetExtraParams(params); 856 TextButton::GetExtraParams(params);
857 params->button.has_border = true; 857 params->button.has_border = true;
858 } 858 }
859 859
860 } // namespace views 860 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/button/custom_button.cc ('k') | views/controls/combobox/native_combobox_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698