OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ | |
7 #pragma once | |
8 | |
9 #include "chrome/browser/chromeos/status/status_area_button.h" | |
10 #include "chrome/browser/prefs/pref_member.h" | |
11 #include "content/common/notification_observer.h" | |
12 #include "views/controls/menu/view_menu_delegate.h" | |
13 | |
14 namespace chromeos { | |
15 | |
16 class StatusAreaHost; | |
17 | |
18 // A class for the button in the status area which alerts the user when | |
19 // accessibility features are enabled. | |
20 class AccessibilityMenuButton : public NotificationObserver, | |
21 public StatusAreaButton, | |
22 public views::ViewMenuDelegate { | |
23 public: | |
24 explicit AccessibilityMenuButton(StatusAreaHost* host); | |
25 virtual ~AccessibilityMenuButton(); | |
26 | |
27 // views::ViewMenuDelegate implementation. | |
28 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.
| |
29 | |
30 // NotificationObserver implementation | |
31 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.
| |
32 const NotificationSource& source, | |
33 const NotificationDetails& details); | |
34 | |
35 // Updates the tooltip text and the accessible name. | |
36 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.
| |
37 | |
38 private: | |
39 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.
| |
40 DISALLOW_COPY_AND_ASSIGN(AccessibilityMenuButton); | |
41 }; | |
42 | |
43 } // namespace chromeos | |
44 | |
45 #endif // CHROME_BROWSER_CHROMEOS_STATUS_ACCESSIBILITY_MENU_BUTTON_H_ | |
OLD | NEW |