Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 10581043: Merge 142921 - Use an infobar instead of alert box for extension install (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_install_prompt.h ('k') | chrome/browser/extensions/extension_install_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698