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

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

Issue 1534303002: CustomButton cleanup: make protected members private, create accessors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont move declaration randomly Created 4 years, 11 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 | « ui/views/controls/button/image_button.cc ('k') | ui/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) 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/label_button.h" 5 #include "ui/views/controls/button/label_button.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 case STATE_NORMAL: return ui::NativeTheme::kNormal; 494 case STATE_NORMAL: return ui::NativeTheme::kNormal;
495 case STATE_HOVERED: return ui::NativeTheme::kHovered; 495 case STATE_HOVERED: return ui::NativeTheme::kHovered;
496 case STATE_PRESSED: return ui::NativeTheme::kPressed; 496 case STATE_PRESSED: return ui::NativeTheme::kPressed;
497 case STATE_DISABLED: return ui::NativeTheme::kDisabled; 497 case STATE_DISABLED: return ui::NativeTheme::kDisabled;
498 case STATE_COUNT: NOTREACHED() << "Unknown state: " << state(); 498 case STATE_COUNT: NOTREACHED() << "Unknown state: " << state();
499 } 499 }
500 return ui::NativeTheme::kNormal; 500 return ui::NativeTheme::kNormal;
501 } 501 }
502 502
503 const gfx::Animation* LabelButton::GetThemeAnimation() const { 503 const gfx::Animation* LabelButton::GetThemeAnimation() const {
504 return hover_animation_.get(); 504 return &hover_animation();
505 } 505 }
506 506
507 ui::NativeTheme::State LabelButton::GetBackgroundThemeState( 507 ui::NativeTheme::State LabelButton::GetBackgroundThemeState(
508 ui::NativeTheme::ExtraParams* params) const { 508 ui::NativeTheme::ExtraParams* params) const {
509 GetExtraParams(params); 509 GetExtraParams(params);
510 return ui::NativeTheme::kNormal; 510 return ui::NativeTheme::kNormal;
511 } 511 }
512 512
513 ui::NativeTheme::State LabelButton::GetForegroundThemeState( 513 ui::NativeTheme::State LabelButton::GetForegroundThemeState(
514 ui::NativeTheme::ExtraParams* params) const { 514 ui::NativeTheme::ExtraParams* params) const {
515 GetExtraParams(params); 515 GetExtraParams(params);
516 return ui::NativeTheme::kHovered; 516 return ui::NativeTheme::kHovered;
517 } 517 }
518 518
519 void LabelButton::ResetCachedPreferredSize() { 519 void LabelButton::ResetCachedPreferredSize() {
520 cached_preferred_size_valid_ = false; 520 cached_preferred_size_valid_ = false;
521 cached_preferred_size_ = gfx::Size(); 521 cached_preferred_size_ = gfx::Size();
522 } 522 }
523 523
524 } // namespace views 524 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/image_button.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698