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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 void ExtensionInstallUI::ShowConfirmation() { | 512 void ExtensionInstallUI::ShowConfirmation() { |
513 prompt_.set_type(prompt_type_); | 513 prompt_.set_type(prompt_type_); |
514 prompt_.SetPermissions(permissions_->GetWarningMessages()); | 514 prompt_.SetPermissions(permissions_->GetWarningMessages()); |
515 | 515 |
516 switch (prompt_type_) { | 516 switch (prompt_type_) { |
517 case PERMISSIONS_PROMPT: | 517 case PERMISSIONS_PROMPT: |
518 case RE_ENABLE_PROMPT: | 518 case RE_ENABLE_PROMPT: |
519 case INLINE_INSTALL_PROMPT: | 519 case INLINE_INSTALL_PROMPT: |
520 case INSTALL_PROMPT: { | 520 case INSTALL_PROMPT: { |
521 prompt_.set_extension(extension_); | 521 prompt_.set_extension(extension_); |
522 prompt_.set_icon(gfx::Image(new SkBitmap(icon_))); | 522 prompt_.set_icon(gfx::Image(icon_)); |
523 ShowExtensionInstallDialog(profile_, delegate_, prompt_); | 523 ShowExtensionInstallDialog(profile_, delegate_, prompt_); |
524 break; | 524 break; |
525 } | 525 } |
526 case BUNDLE_INSTALL_PROMPT: { | 526 case BUNDLE_INSTALL_PROMPT: { |
527 prompt_.set_bundle(bundle_); | 527 prompt_.set_bundle(bundle_); |
528 ShowExtensionInstallDialog(profile_, delegate_, prompt_); | 528 ShowExtensionInstallDialog(profile_, delegate_, prompt_); |
529 break; | 529 break; |
530 } | 530 } |
531 default: | 531 default: |
532 NOTREACHED() << "Unknown message"; | 532 NOTREACHED() << "Unknown message"; |
533 break; | 533 break; |
534 } | 534 } |
535 } | 535 } |
536 | 536 |
537 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( | 537 InfoBarDelegate* ExtensionInstallUI::GetNewThemeInstalledInfoBarDelegate( |
538 TabContentsWrapper* tab_contents, | 538 TabContentsWrapper* tab_contents, |
539 const Extension* new_theme, | 539 const Extension* new_theme, |
540 const std::string& previous_theme_id, | 540 const std::string& previous_theme_id, |
541 bool previous_using_native_theme) { | 541 bool previous_using_native_theme) { |
542 Profile* profile = tab_contents->profile(); | 542 Profile* profile = tab_contents->profile(); |
543 return new ThemeInstalledInfoBarDelegate( | 543 return new ThemeInstalledInfoBarDelegate( |
544 tab_contents->infobar_tab_helper(), | 544 tab_contents->infobar_tab_helper(), |
545 profile->GetExtensionService(), | 545 profile->GetExtensionService(), |
546 ThemeServiceFactory::GetForProfile(profile), | 546 ThemeServiceFactory::GetForProfile(profile), |
547 new_theme, | 547 new_theme, |
548 previous_theme_id, | 548 previous_theme_id, |
549 previous_using_native_theme); | 549 previous_using_native_theme); |
550 } | 550 } |
OLD | NEW |