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