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 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3920 } | 3920 } |
3921 | 3921 |
3922 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { | 3922 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { |
3923 if (window()->GetLocationBar()) | 3923 if (window()->GetLocationBar()) |
3924 window()->GetLocationBar()->InvalidatePageActions(); | 3924 window()->GetLocationBar()->InvalidatePageActions(); |
3925 break; | 3925 break; |
3926 } | 3926 } |
3927 | 3927 |
3928 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: | 3928 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: |
3929 case chrome::NOTIFICATION_EXTENSION_LOADED: | 3929 case chrome::NOTIFICATION_EXTENSION_LOADED: |
3930 if (window()->GetLocationBar()) | 3930 // We can end up here when creating the window, at which point window_ is |
3931 // NULL. | |
Ben Goodger (Google)
2011/08/30 17:19:49
Add the rest of your CL comment here about SHAppBa
| |
3932 if (window() && window()->GetLocationBar()) | |
3931 window()->GetLocationBar()->UpdatePageActions(); | 3933 window()->GetLocationBar()->UpdatePageActions(); |
3932 break; | 3934 break; |
3933 | 3935 |
3934 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: | 3936 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: |
3935 window()->UserChangedTheme(); | 3937 window()->UserChangedTheme(); |
3936 break; | 3938 break; |
3937 | 3939 |
3938 case chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL: { | 3940 case chrome::NOTIFICATION_EXTENSION_READY_FOR_INSTALL: { |
3939 // Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser. | 3941 // Handle EXTENSION_READY_FOR_INSTALL for last active tabbed browser. |
3940 if (BrowserList::FindTabbedBrowser(profile(), true) != this) | 3942 if (BrowserList::FindTabbedBrowser(profile(), true) != this) |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5116 } | 5118 } |
5117 | 5119 |
5118 void Browser::ShowSyncSetup() { | 5120 void Browser::ShowSyncSetup() { |
5119 ProfileSyncService* service = | 5121 ProfileSyncService* service = |
5120 profile()->GetOriginalProfile()->GetProfileSyncService(); | 5122 profile()->GetOriginalProfile()->GetProfileSyncService(); |
5121 if (service->HasSyncSetupCompleted()) | 5123 if (service->HasSyncSetupCompleted()) |
5122 ShowOptionsTab(chrome::kSyncSetupSubPage); | 5124 ShowOptionsTab(chrome::kSyncSetupSubPage); |
5123 else | 5125 else |
5124 service->ShowLoginDialog(); | 5126 service->ShowLoginDialog(); |
5125 } | 5127 } |
OLD | NEW |