Chromium Code Reviews| 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/extensions/extension_install_ui.h" | 5 #include "chrome/browser/extensions/extension_install_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 #if defined(TOOLKIT_VIEWS) | 148 #if defined(TOOLKIT_VIEWS) |
| 149 if (!browser) | 149 if (!browser) |
| 150 return; | 150 return; |
| 151 | 151 |
| 152 ExtensionInstalledBubble::Show(extension, browser, icon_); | 152 ExtensionInstalledBubble::Show(extension, browser, icon_); |
| 153 #elif defined(OS_MACOSX) | 153 #elif defined(OS_MACOSX) |
| 154 DCHECK(browser); | 154 DCHECK(browser); |
| 155 // Note that browser actions don't appear in incognito mode initially, | 155 // Note that browser actions don't appear in incognito mode initially, |
| 156 // so fall back to the generic case. | 156 // so fall back to the generic case. |
| 157 if ((extension->browser_action() && !browser->profile()->IsOffTheRecord()) || | 157 if ((extension->browser_action() && !browser->profile()->IsOffTheRecord()) || |
| 158 !extension->omnibox_keyword().empty() || | |
| 158 (extension->page_action() && | 159 (extension->page_action() && |
| 159 !extension->page_action()->default_icon_path().empty())) { | 160 !extension->page_action()->default_icon_path().empty())) { |
|
Aaron Boodman
2010/11/11 02:55:30
Nit: this line needs to be indented one space.
Matt Perry
2010/11/12 07:20:25
Are you sure? I don't think I've ever seen a multi
Aaron Boodman
2010/11/12 19:04:06
The expression "!extension->page_action()->default
Matt Perry
2010/11/12 23:08:18
Yes, but I've only seen it stop there. It looks we
| |
| 160 ExtensionInstalledBubbleCocoa::ShowExtensionInstalledBubble( | 161 ExtensionInstalledBubbleCocoa::ShowExtensionInstalledBubble( |
| 161 browser->window()->GetNativeHandle(), | 162 browser->window()->GetNativeHandle(), |
| 162 extension, browser, icon_); | 163 extension, browser, icon_); |
| 163 } else { | 164 } else { |
| 164 // If the extension is of type GENERIC, meaning it doesn't have a UI | 165 // If the extension is of type GENERIC, meaning it doesn't have a UI |
| 165 // surface to display for this window, launch infobar instead of popup | 166 // surface to display for this window, launch infobar instead of popup |
| 166 // bubble, because we have no guaranteed wrench menu button to point to. | 167 // bubble, because we have no guaranteed wrench menu button to point to. |
| 167 ShowGenericExtensionInstalledInfoBar(extension); | 168 ShowGenericExtensionInstalledInfoBar(extension); |
| 168 } | 169 } |
| 169 #elif defined(TOOLKIT_GTK) | 170 #elif defined(TOOLKIT_GTK) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 TabContents* tab_contents, const Extension* new_theme, | 308 TabContents* tab_contents, const Extension* new_theme, |
| 308 const std::string& previous_theme_id, bool previous_use_system_theme) { | 309 const std::string& previous_theme_id, bool previous_use_system_theme) { |
| 309 #if defined(TOOLKIT_GTK) | 310 #if defined(TOOLKIT_GTK) |
| 310 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 311 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
| 311 previous_theme_id, previous_use_system_theme); | 312 previous_theme_id, previous_use_system_theme); |
| 312 #else | 313 #else |
| 313 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 314 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
| 314 previous_theme_id); | 315 previous_theme_id); |
| 315 #endif | 316 #endif |
| 316 } | 317 } |
| OLD | NEW |