OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 new BrowserTabRestoreServiceDelegate(this))), | 266 new BrowserTabRestoreServiceDelegate(this))), |
267 ALLOW_THIS_IN_INITIALIZER_LIST( | 267 ALLOW_THIS_IN_INITIALIZER_LIST( |
268 synced_window_delegate_( | 268 synced_window_delegate_( |
269 new BrowserSyncedWindowDelegate(this))), | 269 new BrowserSyncedWindowDelegate(this))), |
270 bookmark_bar_state_(BookmarkBar::HIDDEN), | 270 bookmark_bar_state_(BookmarkBar::HIDDEN), |
271 fullscreened_tab_(NULL), | 271 fullscreened_tab_(NULL), |
272 tab_caused_fullscreen_(false) { | 272 tab_caused_fullscreen_(false) { |
273 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, | 273 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, |
274 NotificationService::AllSources()); | 274 NotificationService::AllSources()); |
275 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, | 275 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, |
276 NotificationService::AllSources()); | 276 Source<Profile>(profile_)); |
277 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 277 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
278 NotificationService::AllSources()); | 278 Source<Profile>(profile_)); |
279 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 279 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
280 NotificationService::AllSources()); | 280 Source<Profile>(profile_)); |
281 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 281 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
282 NotificationService::AllSources()); | 282 Source<Profile>(profile_)); |
283 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, | 283 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, |
284 NotificationService::AllSources()); | 284 Source<Profile>(profile_)); |
285 registrar_.Add( | 285 registrar_.Add( |
286 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, | 286 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
287 Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_))); | 287 Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_))); |
288 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, | 288 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, |
289 NotificationService::AllSources()); | 289 NotificationService::AllSources()); |
290 // We listen to all notification sources because the bookmark bar | 290 // We listen to all notification sources because the bookmark bar |
291 // state needs to stay in sync between the incognito and normal profiles. | 291 // state needs to stay in sync between the incognito and normal profiles. |
292 registrar_.Add(this, | 292 registrar_.Add(this, |
293 chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, | 293 chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, |
294 NotificationService::AllBrowserContextsAndSources()); | 294 NotificationService::AllBrowserContextsAndSources()); |
(...skipping 4821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5116 } | 5116 } |
5117 | 5117 |
5118 void Browser::ShowSyncSetup() { | 5118 void Browser::ShowSyncSetup() { |
5119 ProfileSyncService* service = | 5119 ProfileSyncService* service = |
5120 profile()->GetOriginalProfile()->GetProfileSyncService(); | 5120 profile()->GetOriginalProfile()->GetProfileSyncService(); |
5121 if (service->HasSyncSetupCompleted()) | 5121 if (service->HasSyncSetupCompleted()) |
5122 ShowOptionsTab(chrome::kSyncSetupSubPage); | 5122 ShowOptionsTab(chrome::kSyncSetupSubPage); |
5123 else | 5123 else |
5124 service->ShowLoginDialog(); | 5124 service->ShowLoginDialog(); |
5125 } | 5125 } |
OLD | NEW |