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

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

Issue 12330002: Add views::Button style enum for LabelButton [native] styling, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/button/label_button.cc ('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_border.h
diff --git a/ui/views/controls/button/label_button_border.h b/ui/views/controls/button/label_button_border.h
index 3bb437479042abb65ba9dc16418e38c633fd1e8b..5ff011de963ff60cbb43e727dc8430daf91a95fb 100644
--- a/ui/views/controls/button/label_button_border.h
+++ b/ui/views/controls/button/label_button_border.h
@@ -9,7 +9,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "ui/views/border.h"
-#include "ui/views/controls/button/custom_button.h"
+#include "ui/views/controls/button/button.h"
#include "ui/views/painter.h"
namespace views {
@@ -17,11 +17,10 @@ namespace views {
// A Border that paints a LabelButton's background frame.
class VIEWS_EXPORT LabelButtonBorder : public Border {
public:
- LabelButtonBorder();
+ explicit LabelButtonBorder(Button::ButtonStyle style);
virtual ~LabelButtonBorder();
- bool native_theme() const { return native_theme_; }
- void set_native_theme(bool native_theme) { native_theme_ = native_theme; }
+ Button::ButtonStyle style() const { return style_; }
// Overridden from Border:
virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
@@ -29,15 +28,15 @@ class VIEWS_EXPORT LabelButtonBorder : public Border {
// Get or set the painter used for the specified button state.
// LabelButtonBorder takes and retains ownership of |painter|.
- Painter* GetPainter(CustomButton::ButtonState state);
- void SetPainter(CustomButton::ButtonState state, Painter* painter);
+ Painter* GetPainter(Button::ButtonState state);
+ void SetPainter(Button::ButtonState state, Painter* painter);
private:
// The painters used for each button state.
- scoped_ptr<Painter> painters_[CustomButton::STATE_COUNT];
+ scoped_ptr<Painter> painters_[Button::STATE_COUNT];
- // A flag controlling native (true) or Views theme styling; false by default.
- bool native_theme_;
+ // The button style supplied in part by this border.
+ Button::ButtonStyle style_;
DISALLOW_COPY_AND_ASSIGN(LabelButtonBorder);
};
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/label_button_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698