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

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

Issue 164653002: Remove Unused AsTextButtonBorder RTTI helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/text_button.h ('k') | no next file » | 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/text_button.h" 5 #include "ui/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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 gfx::Size TextButtonBorder::GetMinimumSize() const { 83 gfx::Size TextButtonBorder::GetMinimumSize() const {
84 return gfx::Size(); 84 return gfx::Size();
85 } 85 }
86 86
87 void TextButtonBorder::SetInsets(const gfx::Insets& insets) { 87 void TextButtonBorder::SetInsets(const gfx::Insets& insets) {
88 insets_ = insets; 88 insets_ = insets;
89 } 89 }
90 90
91 TextButtonBorder* TextButtonBorder::AsTextButtonBorder() {
92 return this;
93 }
94
95 const TextButtonBorder* TextButtonBorder::AsTextButtonBorder() const {
96 return this;
97 }
98
99 91
100 // TextButtonDefaultBorder ---------------------------------------------------- 92 // TextButtonDefaultBorder ----------------------------------------------------
101 93
102 TextButtonDefaultBorder::TextButtonDefaultBorder() 94 TextButtonDefaultBorder::TextButtonDefaultBorder()
103 : vertical_padding_(kPreferredPaddingVertical) { 95 : vertical_padding_(kPreferredPaddingVertical) {
104 set_hot_painter(Painter::CreateImageGridPainter(kHotImages)); 96 set_hot_painter(Painter::CreateImageGridPainter(kHotImages));
105 set_pushed_painter(Painter::CreateImageGridPainter(kPushedImages)); 97 set_pushed_painter(Painter::CreateImageGridPainter(kPushedImages));
106 SetInsets(gfx::Insets(vertical_padding_, kPreferredPaddingHorizontal, 98 SetInsets(gfx::Insets(vertical_padding_, kPreferredPaddingHorizontal,
107 vertical_padding_, kPreferredPaddingHorizontal)); 99 vertical_padding_, kPreferredPaddingHorizontal));
108 } 100 }
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (show_multiple_icon_states_) { 740 if (show_multiple_icon_states_) {
749 if (has_hover_icon_ && (state() == STATE_HOVERED)) 741 if (has_hover_icon_ && (state() == STATE_HOVERED))
750 return icon_hover_; 742 return icon_hover_;
751 if (has_pushed_icon_ && (state() == STATE_PRESSED)) 743 if (has_pushed_icon_ && (state() == STATE_PRESSED))
752 return icon_pushed_; 744 return icon_pushed_;
753 } 745 }
754 return icon_; 746 return icon_;
755 } 747 }
756 748
757 } // namespace views 749 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/text_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698