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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // Update commands whose state depends on incognito mode availability and that | 73 // Update commands whose state depends on incognito mode availability and that |
74 // only depend on the profile. | 74 // only depend on the profile. |
75 static void UpdateSharedCommandsForIncognitoAvailability( | 75 static void UpdateSharedCommandsForIncognitoAvailability( |
76 CommandUpdater* command_updater, | 76 CommandUpdater* command_updater, |
77 Profile* profile); | 77 Profile* profile); |
78 | 78 |
79 private: | 79 private: |
80 class InterstitialObserver; | 80 class InterstitialObserver; |
81 | 81 |
82 enum FullScreenMode { | |
83 // Not in fullscreen mode. | |
84 FULLSCREEN_DISABLED, | |
85 | |
86 // Fullscreen mode, occupying the whole screen. | |
87 FULLSCREEN_NORMAL, | |
88 | |
89 // Fullscreen mode for metro snap, occupying the full height and 20% of | |
90 // the screen width. | |
91 FULLSCREEN_METRO_SNAP, | |
92 }; | |
93 | |
94 // Overridden from CommandUpdaterDelegate: | 82 // Overridden from CommandUpdaterDelegate: |
95 virtual void ExecuteCommandWithDisposition( | 83 virtual void ExecuteCommandWithDisposition( |
96 int id, | 84 int id, |
97 WindowOpenDisposition disposition) OVERRIDE; | 85 WindowOpenDisposition disposition) OVERRIDE; |
98 | 86 |
99 // Overridden from ProfileInfoCacheObserver: | 87 // Overridden from ProfileInfoCacheObserver: |
100 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; | 88 virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE; |
101 virtual void OnProfileWasRemoved(const base::FilePath& profile_path, | 89 virtual void OnProfileWasRemoved(const base::FilePath& profile_path, |
102 const string16& profile_name) OVERRIDE; | 90 const string16& profile_name) OVERRIDE; |
103 | 91 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 132 |
145 // Updates commands that affect the bookmark bar. | 133 // Updates commands that affect the bookmark bar. |
146 void UpdateCommandsForBookmarkBar(); | 134 void UpdateCommandsForBookmarkBar(); |
147 | 135 |
148 // Updates commands that affect file selection dialogs in aggregate, | 136 // Updates commands that affect file selection dialogs in aggregate, |
149 // namely the save-page-as state and the open-file state. | 137 // namely the save-page-as state and the open-file state. |
150 void UpdateCommandsForFileSelectionDialogs(); | 138 void UpdateCommandsForFileSelectionDialogs(); |
151 | 139 |
152 // Update commands whose state depends on the type of fullscreen mode the | 140 // Update commands whose state depends on the type of fullscreen mode the |
153 // window is in. | 141 // window is in. |
154 void UpdateCommandsForFullscreenMode(FullScreenMode fullscreen_mode); | 142 void UpdateCommandsForFullscreenMode(); |
155 | 143 |
156 // Update commands whose state depends on whether multiple profiles are | 144 // Update commands whose state depends on whether multiple profiles are |
157 // allowed. | 145 // allowed. |
158 void UpdateCommandsForMultipleProfiles(); | 146 void UpdateCommandsForMultipleProfiles(); |
159 | 147 |
160 // Updates the printing command state. | 148 // Updates the printing command state. |
161 void UpdatePrintingState(); | 149 void UpdatePrintingState(); |
162 | 150 |
163 // Updates the SHOW_SYNC_SETUP menu entry. | 151 // Updates the SHOW_SYNC_SETUP menu entry. |
164 void OnSigninAllowedPrefChange(); | 152 void OnSigninAllowedPrefChange(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 PrefChangeRegistrar profile_pref_registrar_; | 194 PrefChangeRegistrar profile_pref_registrar_; |
207 PrefChangeRegistrar local_pref_registrar_; | 195 PrefChangeRegistrar local_pref_registrar_; |
208 BooleanPrefMember pref_signin_allowed_; | 196 BooleanPrefMember pref_signin_allowed_; |
209 | 197 |
210 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); | 198 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); |
211 }; | 199 }; |
212 | 200 |
213 } // namespace chrome | 201 } // namespace chrome |
214 | 202 |
215 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 203 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
OLD | NEW |