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

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

Issue 3337006: Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from bas... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/button/menu_button.cc ('k') | views/controls/combobox/combobox.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/native_button.h" 5 #include "views/controls/button/native_button.h"
6 6
7 #include "app/keyboard_codes.h"
8 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/keyboard_codes.h"
9 #include "views/controls/native/native_view_host.h" 9 #include "views/controls/native/native_view_host.h"
10 10
11 #if defined(OS_WIN) 11 #if defined(OS_WIN)
12 #include "gfx/platform_font_win.h" 12 #include "gfx/platform_font_win.h"
13 #elif defined(OS_LINUX) 13 #elif defined(OS_LINUX)
14 #include <gdk/gdkkeysyms.h> 14 #include <gdk/gdkkeysyms.h>
15 #include "views/screen.h" 15 #include "views/screen.h"
16 #endif 16 #endif
17 17
18 18
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Update the accessible name whenever the label changes. 84 // Update the accessible name whenever the label changes.
85 SetAccessibleName(label); 85 SetAccessibleName(label);
86 PreferredSizeChanged(); 86 PreferredSizeChanged();
87 } 87 }
88 88
89 void NativeButton::SetIsDefault(bool is_default) { 89 void NativeButton::SetIsDefault(bool is_default) {
90 if (is_default == is_default_) 90 if (is_default == is_default_)
91 return; 91 return;
92 if (is_default) 92 if (is_default)
93 AddAccelerator(Accelerator(app::VKEY_RETURN, false, false, false)); 93 AddAccelerator(Accelerator(base::VKEY_RETURN, false, false, false));
94 else 94 else
95 RemoveAccelerator(Accelerator(app::VKEY_RETURN, false, false, false)); 95 RemoveAccelerator(Accelerator(base::VKEY_RETURN, false, false, false));
96 SetAppearsAsDefault(is_default); 96 SetAppearsAsDefault(is_default);
97 } 97 }
98 98
99 void NativeButton::SetNeedElevation(bool need_elevation) { 99 void NativeButton::SetNeedElevation(bool need_elevation) {
100 need_elevation_ = need_elevation; 100 need_elevation_ = need_elevation;
101 if (native_wrapper_) 101 if (native_wrapper_)
102 native_wrapper_->UpdateLabel(); 102 native_wrapper_->UpdateLabel();
103 PreferredSizeChanged(); 103 PreferredSizeChanged();
104 } 104 }
105 105
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 native_wrapper->UpdateEnabled(); 231 native_wrapper->UpdateEnabled();
232 return native_wrapper; 232 return native_wrapper;
233 } 233 }
234 234
235 void NativeButton::InitBorder() { 235 void NativeButton::InitBorder() {
236 set_border(Border::CreateEmptyBorder(0, kButtonBorderHWidth, 0, 236 set_border(Border::CreateEmptyBorder(0, kButtonBorderHWidth, 0,
237 kButtonBorderHWidth)); 237 kButtonBorderHWidth));
238 } 238 }
239 239
240 } // namespace views 240 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/button/menu_button.cc ('k') | views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698