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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Gets the last blocked command after calling SetBlockCommandExecution(true). | 50 // Gets the last blocked command after calling SetBlockCommandExecution(true). |
51 // Returns the command id or -1 if there is no command blocked. The | 51 // Returns the command id or -1 if there is no command blocked. The |
52 // disposition type of the command will be stored in |*disposition| if it's | 52 // disposition type of the command will be stored in |*disposition| if it's |
53 // not NULL. | 53 // not NULL. |
54 int GetLastBlockedCommand(WindowOpenDisposition* disposition); | 54 int GetLastBlockedCommand(WindowOpenDisposition* disposition); |
55 | 55 |
56 // Notifies the controller that state has changed in one of the following | 56 // Notifies the controller that state has changed in one of the following |
57 // areas and it should update command states. | 57 // areas and it should update command states. |
58 void TabStateChanged(); | 58 void TabStateChanged(); |
| 59 void ZoomStateChanged(); |
59 void ContentRestrictionsChanged(); | 60 void ContentRestrictionsChanged(); |
60 void FullscreenStateChanged(); | 61 void FullscreenStateChanged(); |
61 void PrintingStateChanged(); | 62 void PrintingStateChanged(); |
62 void LoadingStateChanged(bool is_loading, bool force); | 63 void LoadingStateChanged(bool is_loading, bool force); |
63 | 64 |
64 // Shared state updating: these functions are static and public to share with | 65 // Shared state updating: these functions are static and public to share with |
65 // outside code. | 66 // outside code. |
66 | 67 |
67 // Updates the open-file state. | 68 // Updates the open-file state. |
68 static void UpdateOpenFileState(CommandUpdater* command_updater); | 69 static void UpdateOpenFileState(CommandUpdater* command_updater); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 107 |
107 // Initialize state for all browser commands. | 108 // Initialize state for all browser commands. |
108 void InitCommandState(); | 109 void InitCommandState(); |
109 | 110 |
110 // Update commands whose state depends on incognito mode availability. | 111 // Update commands whose state depends on incognito mode availability. |
111 void UpdateCommandsForIncognitoAvailability(); | 112 void UpdateCommandsForIncognitoAvailability(); |
112 | 113 |
113 // Update commands whose state depends on the tab's state. | 114 // Update commands whose state depends on the tab's state. |
114 void UpdateCommandsForTabState(); | 115 void UpdateCommandsForTabState(); |
115 | 116 |
| 117 void UpdateCommandsForZoomState(); |
| 118 |
116 // Updates commands when the content's restrictions change. | 119 // Updates commands when the content's restrictions change. |
117 void UpdateCommandsForContentRestrictionState(); | 120 void UpdateCommandsForContentRestrictionState(); |
118 | 121 |
119 // Updates commands for enabling developer tools. | 122 // Updates commands for enabling developer tools. |
120 void UpdateCommandsForDevTools(); | 123 void UpdateCommandsForDevTools(); |
121 | 124 |
122 // Updates commands for bookmark editing. | 125 // Updates commands for bookmark editing. |
123 void UpdateCommandsForBookmarkEditing(); | 126 void UpdateCommandsForBookmarkEditing(); |
124 | 127 |
125 // Updates commands that affect the bookmark bar. | 128 // Updates commands that affect the bookmark bar. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 PrefChangeRegistrar profile_pref_registrar_; | 183 PrefChangeRegistrar profile_pref_registrar_; |
181 PrefChangeRegistrar local_pref_registrar_; | 184 PrefChangeRegistrar local_pref_registrar_; |
182 BooleanPrefMember pref_signin_allowed_; | 185 BooleanPrefMember pref_signin_allowed_; |
183 | 186 |
184 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); | 187 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); |
185 }; | 188 }; |
186 | 189 |
187 } // namespace chrome | 190 } // namespace chrome |
188 | 191 |
189 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 192 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
OLD | NEW |