| 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_ui.h" | 5 #include "chrome/browser/extensions/extension_install_ui.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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 bool disable_failure_ui_for_tests = false; | 404 bool disable_failure_ui_for_tests = false; |
| 405 | 405 |
| 406 } // namespace | 406 } // namespace |
| 407 | 407 |
| 408 void ExtensionInstallUI::OnInstallFailure(const string16& error) { | 408 void ExtensionInstallUI::OnInstallFailure(const string16& error) { |
| 409 DCHECK(ui_loop_ == MessageLoop::current()); | 409 DCHECK(ui_loop_ == MessageLoop::current()); |
| 410 if (disable_failure_ui_for_tests || skip_post_install_ui_) | 410 if (disable_failure_ui_for_tests || skip_post_install_ui_) |
| 411 return; | 411 return; |
| 412 | 412 |
| 413 Browser* browser = browser::FindLastActiveWithProfile(profile_); | 413 Browser* browser = browser::FindLastActiveWithProfile(profile_); |
| 414 browser::ShowMessageBox(browser ? browser->window()->GetNativeHandle() : NULL, | 414 browser::ShowMessageBox(browser ? browser->window()->GetNativeWindow() : NULL, |
| 415 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALL_FAILURE_TITLE), error, | 415 l10n_util::GetStringUTF16(IDS_EXTENSION_INSTALL_FAILURE_TITLE), error, |
| 416 browser::MESSAGE_BOX_TYPE_WARNING); | 416 browser::MESSAGE_BOX_TYPE_WARNING); |
| 417 } | 417 } |
| 418 | 418 |
| 419 void ExtensionInstallUI::SetIcon(const SkBitmap* image) { | 419 void ExtensionInstallUI::SetIcon(const SkBitmap* image) { |
| 420 if (image) | 420 if (image) |
| 421 icon_ = *image; | 421 icon_ = *image; |
| 422 else | 422 else |
| 423 icon_ = SkBitmap(); | 423 icon_ = SkBitmap(); |
| 424 if (icon_.empty()) | 424 if (icon_.empty()) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 bool previous_using_native_theme) { | 555 bool previous_using_native_theme) { |
| 556 Profile* profile = tab_contents->profile(); | 556 Profile* profile = tab_contents->profile(); |
| 557 return new ThemeInstalledInfoBarDelegate( | 557 return new ThemeInstalledInfoBarDelegate( |
| 558 tab_contents->infobar_tab_helper(), | 558 tab_contents->infobar_tab_helper(), |
| 559 profile->GetExtensionService(), | 559 profile->GetExtensionService(), |
| 560 ThemeServiceFactory::GetForProfile(profile), | 560 ThemeServiceFactory::GetForProfile(profile), |
| 561 new_theme, | 561 new_theme, |
| 562 previous_theme_id, | 562 previous_theme_id, |
| 563 previous_using_native_theme); | 563 previous_using_native_theme); |
| 564 } | 564 } |
| OLD | NEW |