summaryrefslogtreecommitdiff
path: root/chromium/ash/system/tray/tray_popup_header_button.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ash/system/tray/tray_popup_header_button.h')
-rw-r--r--chromium/ash/system/tray/tray_popup_header_button.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/chromium/ash/system/tray/tray_popup_header_button.h b/chromium/ash/system/tray/tray_popup_header_button.h
new file mode 100644
index 00000000000..37849bc2e97
--- /dev/null
+++ b/chromium/ash/system/tray/tray_popup_header_button.h
@@ -0,0 +1,45 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_
+#define ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ui/views/controls/button/image_button.h"
+
+namespace ash {
+namespace internal {
+
+// A ToggleImageButton with fixed size, paddings and hover effects. These
+// buttons are used in the header.
+class ASH_EXPORT TrayPopupHeaderButton : public views::ToggleImageButton {
+ public:
+ static const char kViewClassName[];
+
+ TrayPopupHeaderButton(views::ButtonListener* listener,
+ int enabled_resource_id,
+ int disabled_resource_id,
+ int enabled_resource_id_hover,
+ int disabled_resource_id_hover,
+ int accessible_name_id);
+ virtual ~TrayPopupHeaderButton();
+
+ private:
+ // Overridden from views::View:
+ virtual const char* GetClassName() const OVERRIDE;
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
+
+ // Overridden from views::CustomButton:
+ virtual void StateChanged() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(TrayPopupHeaderButton);
+};
+
+} // namespace internal
+} // namespace ash
+
+#endif // ASH_SYSTEM_TRAY_TRAY_POPUP_HEADER_BUTTON_H_