OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_BROWSER_COMMAND_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
7 | 7 |
8 #include "base/prefs/public/pref_change_registrar.h" | 8 #include "base/prefs/public/pref_change_registrar.h" |
9 #include "base/prefs/public/pref_observer.h" | 9 #include "base/prefs/public/pref_observer.h" |
10 #include "chrome/browser/api/sync/profile_sync_service_observer.h" | 10 #include "chrome/browser/api/sync/profile_sync_service_observer.h" |
11 #include "chrome/browser/command_updater.h" | 11 #include "chrome/browser/command_updater.h" |
| 12 #include "chrome/browser/command_updater_delegate.h" |
12 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 13 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
14 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
15 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
16 #include "webkit/glue/window_open_disposition.h" | 17 #include "webkit/glue/window_open_disposition.h" |
17 | 18 |
18 class Browser; | 19 class Browser; |
19 class BrowserWindow; | 20 class BrowserWindow; |
20 class Profile; | 21 class Profile; |
21 class TabContents; | 22 class TabContents; |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 struct NativeWebKeyboardEvent; | 25 struct NativeWebKeyboardEvent; |
25 } | 26 } |
26 | 27 |
27 namespace chrome { | 28 namespace chrome { |
28 | 29 |
29 class BrowserCommandController : public CommandUpdater::CommandUpdaterDelegate, | 30 class BrowserCommandController : public CommandUpdaterDelegate, |
30 public content::NotificationObserver, | 31 public content::NotificationObserver, |
31 public PrefObserver, | 32 public PrefObserver, |
32 public TabStripModelObserver, | 33 public TabStripModelObserver, |
33 public TabRestoreServiceObserver, | 34 public TabRestoreServiceObserver, |
34 public ProfileSyncServiceObserver { | 35 public ProfileSyncServiceObserver { |
35 public: | 36 public: |
36 explicit BrowserCommandController(Browser* browser); | 37 explicit BrowserCommandController(Browser* browser); |
37 virtual ~BrowserCommandController(); | 38 virtual ~BrowserCommandController(); |
38 | 39 |
39 CommandUpdater* command_updater() { return &command_updater_; } | 40 CommandUpdater* command_updater() { return &command_updater_; } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 FULLSCREEN_DISABLED, | 72 FULLSCREEN_DISABLED, |
72 | 73 |
73 // Fullscreen mode, occupying the whole screen. | 74 // Fullscreen mode, occupying the whole screen. |
74 FULLSCREEN_NORMAL, | 75 FULLSCREEN_NORMAL, |
75 | 76 |
76 // Fullscreen mode for metro snap, occupying the full height and 20% of | 77 // Fullscreen mode for metro snap, occupying the full height and 20% of |
77 // the screen width. | 78 // the screen width. |
78 FULLSCREEN_METRO_SNAP, | 79 FULLSCREEN_METRO_SNAP, |
79 }; | 80 }; |
80 | 81 |
81 // Overridden from CommandUpdater::CommandUpdaterDelegate: | 82 // Overridden from CommandUpdaterDelegate: |
82 virtual void ExecuteCommandWithDisposition( | 83 virtual void ExecuteCommandWithDisposition( |
83 int id, | 84 int id, |
84 WindowOpenDisposition disposition) OVERRIDE; | 85 WindowOpenDisposition disposition) OVERRIDE; |
85 | 86 |
86 // Overridden from content::NotificationObserver: | 87 // Overridden from content::NotificationObserver: |
87 virtual void Observe(int type, | 88 virtual void Observe(int type, |
88 const content::NotificationSource& source, | 89 const content::NotificationSource& source, |
89 const content::NotificationDetails& details) OVERRIDE; | 90 const content::NotificationDetails& details) OVERRIDE; |
90 | 91 |
91 // Overridden from PrefObserver: | 92 // Overridden from PrefObserver: |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 content::NotificationRegistrar registrar_; | 190 content::NotificationRegistrar registrar_; |
190 PrefChangeRegistrar profile_pref_registrar_; | 191 PrefChangeRegistrar profile_pref_registrar_; |
191 PrefChangeRegistrar local_pref_registrar_; | 192 PrefChangeRegistrar local_pref_registrar_; |
192 | 193 |
193 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); | 194 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); |
194 }; | 195 }; |
195 | 196 |
196 } // namespace chrome | 197 } // namespace chrome |
197 | 198 |
198 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 199 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
OLD | NEW |