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

Unified Diff: ui/views/controls/button/label_button.h

Issue 62873007: [Toolbar] Base toolbar button class with background images for button states (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: overriding Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.h
diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h
index c69ea037b1068db7934a1ab1528d7cc6c529a191..3f047329e99e44b275b0024d459ca22b7252a6f7 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -65,12 +65,13 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
ButtonStyle style() const { return style_; }
void SetStyle(ButtonStyle style);
- // Overridden from View:
+ // View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void Layout() OVERRIDE;
virtual const char* GetClassName() const OVERRIDE;
protected:
+ ImageView* image() const { return image_; }
Label* label() const { return label_; }
// Fill |params| with information about the button.
@@ -82,6 +83,9 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// Updates the image view to contain the appropriate button state image.
void UpdateImage();
+ // NativeThemeDelegate:
+ virtual gfx::Rect GetThemePaintRect() const OVERRIDE;
+
private:
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init);
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Label);
@@ -89,16 +93,15 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, LabelAndImage);
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Font);
- // Overridden from CustomButton:
+ // CustomButton:
virtual void StateChanged() OVERRIDE;
- // Overridden from View:
+ // View:
virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
- // Overridden from NativeThemeDelegate:
+ // NativeThemeDelegate:
virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
- virtual gfx::Rect GetThemePaintRect() const OVERRIDE;
virtual ui::NativeTheme::State GetThemeState(
ui::NativeTheme::ExtraParams* params) const OVERRIDE;
virtual const gfx::Animation* GetThemeAnimation() const OVERRIDE;
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698