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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 tab_restore_service_delegate_( | 313 tab_restore_service_delegate_( |
314 new BrowserTabRestoreServiceDelegate(this))), | 314 new BrowserTabRestoreServiceDelegate(this))), |
315 ALLOW_THIS_IN_INITIALIZER_LIST( | 315 ALLOW_THIS_IN_INITIALIZER_LIST( |
316 synced_window_delegate_( | 316 synced_window_delegate_( |
317 new BrowserSyncedWindowDelegate(this))), | 317 new BrowserSyncedWindowDelegate(this))), |
318 bookmark_bar_state_(BookmarkBar::HIDDEN), | 318 bookmark_bar_state_(BookmarkBar::HIDDEN), |
319 window_has_shown_(false) { | 319 window_has_shown_(false) { |
320 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, | 320 registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, |
321 content::NotificationService::AllSources()); | 321 content::NotificationService::AllSources()); |
322 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, | 322 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, |
323 content::Source<Profile>(profile_)); | 323 content::Source<Profile>(profile_->GetOriginalProfile())); |
324 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 324 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
325 content::Source<Profile>(profile_)); | 325 content::Source<Profile>(profile_->GetOriginalProfile())); |
326 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, | 326 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
327 content::Source<Profile>(profile_)); | 327 content::Source<Profile>(profile_->GetOriginalProfile())); |
328 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 328 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
329 content::Source<Profile>(profile_)); | 329 content::Source<Profile>(profile_->GetOriginalProfile())); |
330 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, | 330 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, |
331 content::NotificationService::AllSources()); | 331 content::NotificationService::AllSources()); |
332 registrar_.Add( | 332 registrar_.Add( |
333 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, | 333 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
334 content::Source<ThemeService>( | 334 content::Source<ThemeService>( |
335 ThemeServiceFactory::GetForProfile(profile_))); | 335 ThemeServiceFactory::GetForProfile(profile_))); |
336 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, | 336 registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, |
337 content::NotificationService::AllSources()); | 337 content::NotificationService::AllSources()); |
338 | 338 |
339 PrefService* local_state = g_browser_process->local_state(); | 339 PrefService* local_state = g_browser_process->local_state(); |
(...skipping 4932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5272 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5272 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
5273 } else if (is_type_tabbed()) { | 5273 } else if (is_type_tabbed()) { |
5274 GlobalErrorService* service = | 5274 GlobalErrorService* service = |
5275 GlobalErrorServiceFactory::GetForProfile(profile()); | 5275 GlobalErrorServiceFactory::GetForProfile(profile()); |
5276 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5276 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
5277 if (error) { | 5277 if (error) { |
5278 error->ShowBubbleView(this); | 5278 error->ShowBubbleView(this); |
5279 } | 5279 } |
5280 } | 5280 } |
5281 } | 5281 } |
OLD | NEW |