summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status/status_area_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/status/status_area_button.h')
-rw-r--r--chrome/browser/chromeos/status/status_area_button.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/status/status_area_button.h b/chrome/browser/chromeos/status/status_area_button.h
index b751653..6d57178 100644
--- a/chrome/browser/chromeos/status/status_area_button.h
+++ b/chrome/browser/chromeos/status/status_area_button.h
@@ -4,6 +4,7 @@
#ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
#define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_BUTTON_H_
+#pragma once
#include "views/controls/button/menu_button.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -18,6 +19,15 @@ class StatusAreaButton : public views::MenuButton {
virtual ~StatusAreaButton() {}
virtual void Paint(gfx::Canvas* canvas, bool for_drag);
virtual gfx::Size GetPreferredSize();
+ virtual gfx::Insets GetInsets() const;
+
+ // Overrides TextButton's SetText to clear max text size before seting new
+ // text content so that the button size would fit the new text size.
+ virtual void SetText(const std::wstring& text);
+
+ void set_use_menu_button_paint(bool use_menu_button_paint) {
+ use_menu_button_paint_ = use_menu_button_paint;
+ }
protected:
// Draws the pressed icon. This is called before DrawIcon if the state is
@@ -30,6 +40,12 @@ class StatusAreaButton : public views::MenuButton {
// Otherwise, just call SetIcon() and the it will be handled for you.
virtual void DrawIcon(gfx::Canvas* canvas);
+ // True if the button wants to use views::MenuButton drawings.
+ bool use_menu_button_paint_;
+
+ // Insets to use for this button.
+ gfx::Insets insets_;
+
DISALLOW_COPY_AND_ASSIGN(StatusAreaButton);
};