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

Side by Side Diff: chrome/browser/chromeos/status/caps_lock_menu_button.h

Issue 8438064: Separate StatusAreaView from StatusAreaViewChromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/timer.h" 11 #include "base/timer.h"
12 #include "chrome/browser/chromeos/status/status_area_button.h" 12 #include "chrome/browser/chromeos/status/status_area_button.h"
13 #include "chrome/browser/chromeos/system_key_event_listener.h" 13 #include "chrome/browser/chromeos/system_key_event_listener.h"
14 #include "chrome/browser/prefs/pref_member.h" 14 #include "chrome/browser/prefs/pref_member.h"
15 #include "content/public/browser/notification_observer.h" 15 #include "content/public/browser/notification_observer.h"
16 #include "views/controls/menu/menu_delegate.h" 16 #include "views/controls/menu/menu_delegate.h"
17 #include "views/controls/menu/view_menu_delegate.h" 17 #include "views/controls/menu/view_menu_delegate.h"
18 18
19 class Bubble; 19 class Bubble;
20 20
21 namespace views { 21 namespace views {
22 class MenuRunner; 22 class MenuRunner;
23 } 23 }
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 class StatusAreaHost;
28 class StatusAreaBubbleContentView; 27 class StatusAreaBubbleContentView;
29 class StatusAreaBubbleController; 28 class StatusAreaBubbleController;
30 29
31 // A class for the button in the status area which alerts the user when caps 30 // A class for the button in the status area which alerts the user when caps
32 // lock is active. 31 // lock is active.
33 class CapsLockMenuButton : public content::NotificationObserver, 32 class CapsLockMenuButton : public content::NotificationObserver,
34 public StatusAreaButton, 33 public StatusAreaButton,
35 public views::MenuDelegate, 34 public views::MenuDelegate,
36 public views::ViewMenuDelegate, 35 public views::ViewMenuDelegate,
37 public SystemKeyEventListener::CapsLockObserver { 36 public SystemKeyEventListener::CapsLockObserver {
38 public: 37 public:
39 explicit CapsLockMenuButton(StatusAreaHost* host); 38 explicit CapsLockMenuButton(StatusAreaButton::Delegate* delegate);
40 virtual ~CapsLockMenuButton(); 39 virtual ~CapsLockMenuButton();
41 40
42 // views::View implementation. 41 // views::View implementation.
43 virtual void OnLocaleChanged(); 42 virtual void OnLocaleChanged();
44 43
45 // views::MenuDelegate implementation. 44 // views::MenuDelegate implementation.
46 virtual string16 GetLabel(int id) const; 45 virtual string16 GetLabel(int id) const;
47 46
48 // views::ViewMenuDelegate implementation. 47 // views::ViewMenuDelegate implementation.
49 virtual void RunMenu(views::View* unused_source, const gfx::Point& pt); 48 virtual void RunMenu(views::View* unused_source, const gfx::Point& pt);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // # of times |bubble_| is shown. 92 // # of times |bubble_| is shown.
94 size_t bubble_count_; 93 size_t bubble_count_;
95 // TODO(yusukes): Save should_show_bubble_ and bubble_count_ in Preferences. 94 // TODO(yusukes): Save should_show_bubble_ and bubble_count_ in Preferences.
96 95
97 DISALLOW_COPY_AND_ASSIGN(CapsLockMenuButton); 96 DISALLOW_COPY_AND_ASSIGN(CapsLockMenuButton);
98 }; 97 };
99 98
100 } // namespace chromeos 99 } // namespace chromeos
101 100
102 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_ 101 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CAPS_LOCK_MENU_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698