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

Side by Side Diff: ui/views/controls/button/custom_button.cc

Issue 15419002: views: Store only the name of the class in kViewClassName constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/label_button.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 "ui/views/controls/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/base/animation/throb_animation.h" 8 #include "ui/base/animation/throb_animation.h"
9 #include "ui/base/events/event.h" 9 #include "ui/base/events/event.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
11 #include "ui/gfx/screen.h" 11 #include "ui/gfx/screen.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 // How long the hover animation takes if uninterrupted. 16 // How long the hover animation takes if uninterrupted.
17 static const int kHoverFadeDurationMs = 150; 17 static const int kHoverFadeDurationMs = 150;
18 18
19 // static 19 // static
20 const char CustomButton::kViewClassName[] = "views/CustomButton"; 20 const char CustomButton::kViewClassName[] = "CustomButton";
21 21
22 //////////////////////////////////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////////////////////////////////
23 // CustomButton, public: 23 // CustomButton, public:
24 24
25 CustomButton::~CustomButton() { 25 CustomButton::~CustomButton() {
26 } 26 }
27 27
28 void CustomButton::SetState(ButtonState state) { 28 void CustomButton::SetState(ButtonState state) {
29 if (state == state_) 29 if (state == state_)
30 return; 30 return;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 if (!details.is_add && state_ != STATE_DISABLED) 330 if (!details.is_add && state_ != STATE_DISABLED)
331 SetState(STATE_NORMAL); 331 SetState(STATE_NORMAL);
332 } 332 }
333 333
334 void CustomButton::OnBlur() { 334 void CustomButton::OnBlur() {
335 if (IsHotTracked()) 335 if (IsHotTracked())
336 SetState(STATE_NORMAL); 336 SetState(STATE_NORMAL);
337 } 337 }
338 338
339 } // namespace views 339 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/checkbox.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698