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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // namely the save-page-as state and the open-file state. | 133 // namely the save-page-as state and the open-file state. |
134 void UpdateCommandsForFileSelectionDialogs(); | 134 void UpdateCommandsForFileSelectionDialogs(); |
135 | 135 |
136 // Update commands whose state depends on the type of fullscreen mode the | 136 // Update commands whose state depends on the type of fullscreen mode the |
137 // window is in. | 137 // window is in. |
138 void UpdateCommandsForFullscreenMode(); | 138 void UpdateCommandsForFullscreenMode(); |
139 | 139 |
140 // Updates the printing command state. | 140 // Updates the printing command state. |
141 void UpdatePrintingState(); | 141 void UpdatePrintingState(); |
142 | 142 |
143 // Updates the SHOW_SYNC_SETUP menu entry. | |
144 void OnSigninAllowedPrefChange(); | |
145 | |
146 // Updates the save-page-as command state. | 143 // Updates the save-page-as command state. |
147 void UpdateSaveAsState(); | 144 void UpdateSaveAsState(); |
148 | 145 |
149 // Updates the show-sync command state. | |
150 void UpdateShowSyncState(bool show_main_ui); | |
151 | |
152 // Ask the Reload/Stop button to change its icon, and update the Stop command | 146 // Ask the Reload/Stop button to change its icon, and update the Stop command |
153 // state. |is_loading| is true if the current WebContents is loading. | 147 // state. |is_loading| is true if the current WebContents is loading. |
154 // |force| is true if the button should change its icon immediately. | 148 // |force| is true if the button should change its icon immediately. |
155 void UpdateReloadStopState(bool is_loading, bool force); | 149 void UpdateReloadStopState(bool is_loading, bool force); |
156 | 150 |
157 // Updates commands for find. | 151 // Updates commands for find. |
158 void UpdateCommandsForFind(); | 152 void UpdateCommandsForFind(); |
159 | 153 |
160 void UpdateTabRestoreCommandState(); | 154 void UpdateTabRestoreCommandState(); |
161 | 155 |
(...skipping 16 matching lines...) Expand all Loading... |
178 // Stores the last blocked command id when |block_command_execution_| is true. | 172 // Stores the last blocked command id when |block_command_execution_| is true. |
179 int last_blocked_command_id_; | 173 int last_blocked_command_id_; |
180 | 174 |
181 // Stores the disposition type of the last blocked command. | 175 // Stores the disposition type of the last blocked command. |
182 WindowOpenDisposition last_blocked_command_disposition_; | 176 WindowOpenDisposition last_blocked_command_disposition_; |
183 | 177 |
184 std::vector<InterstitialObserver*> interstitial_observers_; | 178 std::vector<InterstitialObserver*> interstitial_observers_; |
185 | 179 |
186 PrefChangeRegistrar profile_pref_registrar_; | 180 PrefChangeRegistrar profile_pref_registrar_; |
187 PrefChangeRegistrar local_pref_registrar_; | 181 PrefChangeRegistrar local_pref_registrar_; |
188 BooleanPrefMember pref_signin_allowed_; | |
189 | 182 |
190 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); | 183 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); |
191 }; | 184 }; |
192 | 185 |
193 } // namespace chrome | 186 } // namespace chrome |
194 | 187 |
195 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 188 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
OLD | NEW |