| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2956 } | 2956 } |
| 2957 | 2957 |
| 2958 case NotificationType::BROWSER_THEME_CHANGED: | 2958 case NotificationType::BROWSER_THEME_CHANGED: |
| 2959 window()->UserChangedTheme(); | 2959 window()->UserChangedTheme(); |
| 2960 break; | 2960 break; |
| 2961 | 2961 |
| 2962 case NotificationType::EXTENSION_READY_FOR_INSTALL: { | 2962 case NotificationType::EXTENSION_READY_FOR_INSTALL: { |
| 2963 // Handle EXTENSION_READY_FOR_INSTALL for last active normal browser. | 2963 // Handle EXTENSION_READY_FOR_INSTALL for last active normal browser. |
| 2964 if (BrowserList::FindBrowserWithType(profile(), | 2964 if (BrowserList::FindBrowserWithType(profile(), |
| 2965 Browser::TYPE_NORMAL, | 2965 Browser::TYPE_NORMAL, |
| 2966 false) != this) | 2966 true) != this) |
| 2967 break; | 2967 break; |
| 2968 | 2968 |
| 2969 // We only want to show the loading dialog for themes, but we don't want | 2969 // We only want to show the loading dialog for themes, but we don't want |
| 2970 // to wait until unpack to find out an extension is a theme, so we test | 2970 // to wait until unpack to find out an extension is a theme, so we test |
| 2971 // the download_url GURL instead. This means that themes in the extensions | 2971 // the download_url GURL instead. This means that themes in the extensions |
| 2972 // gallery won't get the loading dialog. | 2972 // gallery won't get the loading dialog. |
| 2973 GURL download_url = *(Details<GURL>(details).ptr()); | 2973 GURL download_url = *(Details<GURL>(details).ptr()); |
| 2974 if (ExtensionsService::IsDownloadFromMiniGallery(download_url)) | 2974 if (ExtensionsService::IsDownloadFromMiniGallery(download_url)) |
| 2975 window()->ShowThemeInstallBubble(); | 2975 window()->ShowThemeInstallBubble(); |
| 2976 break; | 2976 break; |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3937 } | 3937 } |
| 3938 | 3938 |
| 3939 bool Browser::IsPinned(TabContents* source) { | 3939 bool Browser::IsPinned(TabContents* source) { |
| 3940 int index = tabstrip_model_.GetIndexOfTabContents(source); | 3940 int index = tabstrip_model_.GetIndexOfTabContents(source); |
| 3941 if (index == TabStripModel::kNoTab) { | 3941 if (index == TabStripModel::kNoTab) { |
| 3942 NOTREACHED() << "IsPinned called for tab not in our strip"; | 3942 NOTREACHED() << "IsPinned called for tab not in our strip"; |
| 3943 return false; | 3943 return false; |
| 3944 } | 3944 } |
| 3945 return tabstrip_model_.IsTabPinned(index); | 3945 return tabstrip_model_.IsTabPinned(index); |
| 3946 } | 3946 } |
| OLD | NEW |