| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 icon_ = *image; | 271 icon_ = *image; |
| 272 else | 272 else |
| 273 icon_ = SkBitmap(); | 273 icon_ = SkBitmap(); |
| 274 if (icon_.empty()) { | 274 if (icon_.empty()) { |
| 275 icon_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( | 275 icon_ = *ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 276 IDR_EXTENSION_DEFAULT_ICON); | 276 IDR_EXTENSION_DEFAULT_ICON); |
| 277 } | 277 } |
| 278 | 278 |
| 279 switch (prompt_type_) { | 279 switch (prompt_type_) { |
| 280 case INSTALL_PROMPT: { | 280 case INSTALL_PROMPT: { |
| 281 if (extension_->GetFullLaunchURL().is_valid()) { | 281 // TODO(jcivelli): http://crbug.com/44771 We should not show an install |
| 282 // Special case extension apps to not show the install dialog. | 282 // dialog when installing an app from the gallery. |
| 283 // TODO(finnur): http://crbug.com/42443: Don't do this for all apps. | |
| 284 delegate_->InstallUIProceed(false); // |create_app_shortcut|. | |
| 285 return; | |
| 286 } | |
| 287 | |
| 288 NotificationService* service = NotificationService::current(); | 283 NotificationService* service = NotificationService::current(); |
| 289 service->Notify(NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, | 284 service->Notify(NotificationType::EXTENSION_WILL_SHOW_CONFIRM_DIALOG, |
| 290 Source<ExtensionInstallUI>(this), | 285 Source<ExtensionInstallUI>(this), |
| 291 NotificationService::NoDetails()); | 286 NotificationService::NoDetails()); |
| 292 | 287 |
| 293 std::vector<string16> warnings; | 288 std::vector<string16> warnings; |
| 294 GetV2Warnings(extension_, &warnings); | 289 GetV2Warnings(extension_, &warnings); |
| 295 ShowExtensionInstallUIPrompt2Impl( | 290 ShowExtensionInstallUIPrompt2Impl( |
| 296 profile_, delegate_, extension_, &icon_, warnings); | 291 profile_, delegate_, extension_, &icon_, warnings); |
| 297 break; | 292 break; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 TabContents* tab_contents, Extension* new_theme, | 382 TabContents* tab_contents, Extension* new_theme, |
| 388 const std::string& previous_theme_id, bool previous_use_system_theme) { | 383 const std::string& previous_theme_id, bool previous_use_system_theme) { |
| 389 #if defined(TOOLKIT_GTK) | 384 #if defined(TOOLKIT_GTK) |
| 390 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 385 return new GtkThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
| 391 previous_theme_id, previous_use_system_theme); | 386 previous_theme_id, previous_use_system_theme); |
| 392 #else | 387 #else |
| 393 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, | 388 return new ThemeInstalledInfoBarDelegate(tab_contents, new_theme, |
| 394 previous_theme_id); | 389 previous_theme_id); |
| 395 #endif | 390 #endif |
| 396 } | 391 } |
| OLD | NEW |