| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |