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

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

Issue 81833007: Remove unnecessary Border subclasses where we can achieve the same functionality (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 68
69 // TextButtonBorder ----------------------------------------------------------- 69 // TextButtonBorder -----------------------------------------------------------
70 70
71 TextButtonBorder::TextButtonBorder() { 71 TextButtonBorder::TextButtonBorder() {
72 } 72 }
73 73
74 TextButtonBorder::~TextButtonBorder() { 74 TextButtonBorder::~TextButtonBorder() {
75 } 75 }
76 76
77 void TextButtonBorder::Paint(const View& view, gfx::Canvas* canvas) {
78 }
79
77 gfx::Insets TextButtonBorder::GetInsets() const { 80 gfx::Insets TextButtonBorder::GetInsets() const {
78 return insets_; 81 return insets_;
79 } 82 }
80 83
81 void TextButtonBorder::SetInsets(const gfx::Insets& insets) { 84 void TextButtonBorder::SetInsets(const gfx::Insets& insets) {
82 insets_ = insets; 85 insets_ = insets;
83 } 86 }
84 87
85 TextButtonBorder* TextButtonBorder::AsTextButtonBorder() { 88 TextButtonBorder* TextButtonBorder::AsTextButtonBorder() {
86 return this; 89 return this;
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 if (show_multiple_icon_states_) { 715 if (show_multiple_icon_states_) {
713 if (has_hover_icon_ && (state() == STATE_HOVERED)) 716 if (has_hover_icon_ && (state() == STATE_HOVERED))
714 return icon_hover_; 717 return icon_hover_;
715 if (has_pushed_icon_ && (state() == STATE_PRESSED)) 718 if (has_pushed_icon_ && (state() == STATE_PRESSED))
716 return icon_pushed_; 719 return icon_pushed_;
717 } 720 }
718 return icon_; 721 return icon_;
719 } 722 }
720 723
721 } // namespace views 724 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698