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

Unified Diff: chrome/browser/chromeos/status/accessibility_menu_button.h

Issue 7753029: Add a button on status bar to indicate that accessibility is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
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_

Powered by Google App Engine
This is Rietveld 408576698