| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_prompt.h" | 5 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 341 } |
| 342 | 342 |
| 343 void ExtensionInstallPrompt::OnInstallSuccess(const Extension* extension, | 343 void ExtensionInstallPrompt::OnInstallSuccess(const Extension* extension, |
| 344 SkBitmap* icon) { | 344 SkBitmap* icon) { |
| 345 extension_ = extension; | 345 extension_ = extension; |
| 346 SetIcon(icon); | 346 SetIcon(icon); |
| 347 | 347 |
| 348 install_ui_->OnInstallSuccess(extension, &icon_); | 348 install_ui_->OnInstallSuccess(extension, &icon_); |
| 349 } | 349 } |
| 350 | 350 |
| 351 void ExtensionInstallPrompt::OnInstallFailure(const string16& error) { | 351 void ExtensionInstallPrompt::OnInstallFailure(const CrxInstallerError& error) { |
| 352 install_ui_->OnInstallFailure(error); | 352 install_ui_->OnInstallFailure(error); |
| 353 } | 353 } |
| 354 | 354 |
| 355 void ExtensionInstallPrompt::SetIcon(const SkBitmap* image) { | 355 void ExtensionInstallPrompt::SetIcon(const SkBitmap* image) { |
| 356 if (image) | 356 if (image) |
| 357 icon_ = *image; | 357 icon_ = *image; |
| 358 else | 358 else |
| 359 icon_ = SkBitmap(); | 359 icon_ = SkBitmap(); |
| 360 if (icon_.empty()) | 360 if (icon_.empty()) |
| 361 icon_ = Extension::GetDefaultIcon(extension_->is_app()); | 361 icon_ = Extension::GetDefaultIcon(extension_->is_app()); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 case BUNDLE_INSTALL_PROMPT: { | 401 case BUNDLE_INSTALL_PROMPT: { |
| 402 prompt_.set_bundle(bundle_); | 402 prompt_.set_bundle(bundle_); |
| 403 ShowExtensionInstallDialog(browser_, delegate_, prompt_); | 403 ShowExtensionInstallDialog(browser_, delegate_, prompt_); |
| 404 break; | 404 break; |
| 405 } | 405 } |
| 406 default: | 406 default: |
| 407 NOTREACHED() << "Unknown message"; | 407 NOTREACHED() << "Unknown message"; |
| 408 break; | 408 break; |
| 409 } | 409 } |
| 410 } | 410 } |
| OLD | NEW |