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

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

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDirectlyToSecondWindow. Created 6 years, 6 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/menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/menu_button.h
diff --git a/ui/views/controls/button/menu_button.h b/ui/views/controls/button/menu_button.h
index 1ca6de07936d7f9709a9f52a31bcb5e6eb2b0127..257d2f62ea98ff1f1d5ef7d9dc4d8e6c1952bd8d 100644
--- a/ui/views/controls/button/menu_button.h
+++ b/ui/views/controls/button/menu_button.h
@@ -10,7 +10,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "ui/views/background.h"
-#include "ui/views/controls/button/text_button.h"
+#include "ui/views/controls/button/label_button.h"
namespace views {
@@ -23,7 +23,7 @@ class MenuButtonListener;
// A button that shows a menu when the left mouse button is pushed
//
////////////////////////////////////////////////////////////////////////////////
-class VIEWS_EXPORT MenuButton : public TextButton {
+class VIEWS_EXPORT MenuButton : public LabelButton {
public:
static const char kViewClassName[];
@@ -50,12 +50,10 @@ class VIEWS_EXPORT MenuButton : public TextButton {
// Activate the button (called when the button is pressed).
virtual bool Activate();
- // Overridden from TextButton for the potential use of a drop marker.
- virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE;
-
// Overridden from View:
virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual const char* GetClassName() const OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
@@ -68,6 +66,9 @@ class VIEWS_EXPORT MenuButton : public TextButton {
// Paint the menu marker image.
void PaintMenuMarker(gfx::Canvas* canvas);
+ // Overridden from LabelButton:
+ virtual gfx::Rect GetChildAreaBounds() OVERRIDE;
+
// True if the menu is currently visible.
bool menu_visible_;
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698