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 "chrome/browser/api/sync/profile_sync_service_observer.h" | 9 #include "base/prefs/public/pref_member.h" |
10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
11 #include "chrome/browser/command_updater_delegate.h" | 11 #include "chrome/browser/command_updater_delegate.h" |
12 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 12 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
13 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 13 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
17 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
18 | 18 |
19 class Browser; | 19 class Browser; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // window is in. | 162 // window is in. |
163 void UpdateCommandsForFullscreenMode(FullScreenMode fullscreen_mode); | 163 void UpdateCommandsForFullscreenMode(FullScreenMode fullscreen_mode); |
164 | 164 |
165 // Update commands whose state depends on whether multiple profiles are | 165 // Update commands whose state depends on whether multiple profiles are |
166 // allowed. | 166 // allowed. |
167 void UpdateCommandsForMultipleProfiles(); | 167 void UpdateCommandsForMultipleProfiles(); |
168 | 168 |
169 // Updates the printing command state. | 169 // Updates the printing command state. |
170 void UpdatePrintingState(); | 170 void UpdatePrintingState(); |
171 | 171 |
| 172 // Updates the SHOW_SYNC_SETUP menu entry. |
| 173 void OnSigninAllowedPrefChange(); |
| 174 |
172 // Updates the save-page-as command state. | 175 // Updates the save-page-as command state. |
173 void UpdateSaveAsState(); | 176 void UpdateSaveAsState(); |
174 | 177 |
175 // Ask the Reload/Stop button to change its icon, and update the Stop command | 178 // Ask the Reload/Stop button to change its icon, and update the Stop command |
176 // state. |is_loading| is true if the current WebContents is loading. | 179 // state. |is_loading| is true if the current WebContents is loading. |
177 // |force| is true if the button should change its icon immediately. | 180 // |force| is true if the button should change its icon immediately. |
178 void UpdateReloadStopState(bool is_loading, bool force); | 181 void UpdateReloadStopState(bool is_loading, bool force); |
179 | 182 |
180 // Updates commands for find. | 183 // Updates commands for find. |
181 void UpdateCommandsForFind(); | 184 void UpdateCommandsForFind(); |
(...skipping 18 matching lines...) Expand all Loading... |
200 | 203 |
201 // Stores the last blocked command id when |block_command_execution_| is true. | 204 // Stores the last blocked command id when |block_command_execution_| is true. |
202 int last_blocked_command_id_; | 205 int last_blocked_command_id_; |
203 | 206 |
204 // Stores the disposition type of the last blocked command. | 207 // Stores the disposition type of the last blocked command. |
205 WindowOpenDisposition last_blocked_command_disposition_; | 208 WindowOpenDisposition last_blocked_command_disposition_; |
206 | 209 |
207 content::NotificationRegistrar registrar_; | 210 content::NotificationRegistrar registrar_; |
208 PrefChangeRegistrar profile_pref_registrar_; | 211 PrefChangeRegistrar profile_pref_registrar_; |
209 PrefChangeRegistrar local_pref_registrar_; | 212 PrefChangeRegistrar local_pref_registrar_; |
| 213 BooleanPrefMember pref_signin_allowed_; |
210 | 214 |
211 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); | 215 DISALLOW_COPY_AND_ASSIGN(BrowserCommandController); |
212 }; | 216 }; |
213 | 217 |
214 } // namespace chrome | 218 } // namespace chrome |
215 | 219 |
216 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ | 220 #endif // CHROME_BROWSER_UI_BROWSER_COMMAND_CONTROLLER_H_ |
OLD | NEW |