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

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

Issue 1773893002: Make MdTextButton a LabelButton, use it in the DL shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove commented out code Created 4 years, 9 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/md_text_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/md_text_button.h
diff --git a/ui/views/controls/button/md_text_button.h b/ui/views/controls/button/md_text_button.h
index ba982a32a9363a2129b714c3ef34df3dedf45dd8..605f93f229e4c204e63853c0c2ea8d58a19fb330 100644
--- a/ui/views/controls/button/md_text_button.h
+++ b/ui/views/controls/button/md_text_button.h
@@ -6,28 +6,28 @@
#define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
#include "base/memory/scoped_ptr.h"
-#include "ui/views/controls/button/custom_button.h"
-
-namespace gfx {
-class RenderText;
-}
+#include "ui/views/animation/button_ink_drop_delegate.h"
+#include "ui/views/controls/button/label_button.h"
namespace views {
// A button class that implements the Material Design text button spec.
-class VIEWS_EXPORT MdTextButton : public CustomButton {
+class VIEWS_EXPORT MdTextButton : public LabelButton {
public:
- MdTextButton(ButtonListener* listener, const base::string16& text);
- ~MdTextButton() override;
+ // Creates a normal STYLE_BUTTON LabelButton in pre-MD, or an MdTextButton
+ // in MD mode.
+ static LabelButton* CreateStandardButton(ButtonListener* listener,
+ const base::string16& text);
- // View:
- void OnPaint(gfx::Canvas* canvas) override;
- gfx::Size GetPreferredSize() const override;
+ // LabelButton:
+ SkColor GetInkDropBaseColor() const override;
+ void SetText(const base::string16& text) override;
private:
- void UpdateColor();
+ MdTextButton(ButtonListener* listener);
+ ~MdTextButton() override;
- scoped_ptr<gfx::RenderText> render_text_;
+ ButtonInkDropDelegate ink_drop_delegate_;
DISALLOW_COPY_AND_ASSIGN(MdTextButton);
};
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/md_text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698