Index: chrome/browser/chromeos/status/accessibility_menu_button.h |
diff --git a/chrome/browser/chromeos/status/accessibility_menu_button.h b/chrome/browser/chromeos/status/accessibility_menu_button.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..80a842a6271e8da63b17b099ee2bd25e86e379a0 |
--- /dev/null |
+++ b/chrome/browser/chromeos/status/accessibility_menu_button.h |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ |
+#define CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ |
+#pragma once |
+ |
+#include "chrome/browser/chromeos/status/status_area_button.h" |
+#include "chrome/browser/prefs/pref_member.h" |
+#include "content/common/notification_observer.h" |
+#include "views/controls/menu/view_menu_delegate.h" |
+ |
+namespace chromeos { |
+ |
+class StatusAreaHost; |
+ |
+// A class for the button in the status area which alerts the user when |
+// accessibility features are enabled. |
+class AccessibilityMenuButton : public NotificationObserver, |
+ public StatusAreaButton, |
+ public views::ViewMenuDelegate { |
+ public: |
+ explicit AccessibilityMenuButton(StatusAreaHost* host); |
+ virtual ~AccessibilityMenuButton(); |
+ |
+ // views::ViewMenuDelegate implementation. |
+ virtual void RunMenu(views::View* unused_source, const gfx::Point& pt); |
Zachary Kuznia
2011/08/29 04:09:48
Add the OVERRIDE marker here.
hashimoto
2011/08/29 08:22:48
Fixed.
|
+ |
+ // NotificationObserver implementation |
+ virtual void Observe(int type, |
Zachary Kuznia
2011/08/29 04:09:48
Add the OVERRIDE marker here.
hashimoto
2011/08/29 08:22:48
Fixed.
|
+ const NotificationSource& source, |
+ const NotificationDetails& details); |
+ |
+ // Updates the tooltip text and the accessible name. |
+ void UpdateTooltip(); |
Zachary Kuznia
2011/08/29 04:09:48
This should probably be private.
hashimoto
2011/08/29 08:22:48
Good point, thanks.
|
+ |
+ private: |
+ BooleanPrefMember accessibility_enabled_; |
Zachary Kuznia
2011/08/29 04:09:48
nit: I think there should be a blank line here.
hashimoto
2011/08/29 08:22:48
Fixed.
|
+ DISALLOW_COPY_AND_ASSIGN(AccessibilityMenuButton); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ |