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/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 localized_manifest.get() ? *localized_manifest.get() : *manifest, | 654 localized_manifest.get() ? *localized_manifest.get() : *manifest, |
655 flags, | 655 flags, |
656 id, | 656 id, |
657 error); | 657 error); |
658 } | 658 } |
659 | 659 |
660 ExtensionInstallPrompt::ExtensionInstallPrompt(content::WebContents* contents) | 660 ExtensionInstallPrompt::ExtensionInstallPrompt(content::WebContents* contents) |
661 : ui_loop_(base::MessageLoop::current()), | 661 : ui_loop_(base::MessageLoop::current()), |
662 extension_(NULL), | 662 extension_(NULL), |
663 bundle_(NULL), | 663 bundle_(NULL), |
664 install_ui_(ExtensionInstallUI::Create(ProfileForWebContents(contents))), | 664 install_ui_( |
| 665 chrome::CreateExtensionInstallUI(ProfileForWebContents(contents))), |
665 show_params_(contents), | 666 show_params_(contents), |
666 delegate_(NULL) { | 667 delegate_(NULL) { |
667 } | 668 } |
668 | 669 |
669 ExtensionInstallPrompt::ExtensionInstallPrompt( | 670 ExtensionInstallPrompt::ExtensionInstallPrompt( |
670 Profile* profile, | 671 Profile* profile, |
671 gfx::NativeWindow native_window, | 672 gfx::NativeWindow native_window, |
672 content::PageNavigator* navigator) | 673 content::PageNavigator* navigator) |
673 : ui_loop_(base::MessageLoop::current()), | 674 : ui_loop_(base::MessageLoop::current()), |
674 extension_(NULL), | 675 extension_(NULL), |
675 bundle_(NULL), | 676 bundle_(NULL), |
676 install_ui_(ExtensionInstallUI::Create(profile)), | 677 install_ui_(chrome::CreateExtensionInstallUI(profile)), |
677 show_params_(native_window, navigator), | 678 show_params_(native_window, navigator), |
678 delegate_(NULL) { | 679 delegate_(NULL) { |
679 } | 680 } |
680 | 681 |
681 ExtensionInstallPrompt::~ExtensionInstallPrompt() { | 682 ExtensionInstallPrompt::~ExtensionInstallPrompt() { |
682 } | 683 } |
683 | 684 |
684 void ExtensionInstallPrompt::ConfirmBundleInstall( | 685 void ExtensionInstallPrompt::ConfirmBundleInstall( |
685 extensions::BundleInstaller* bundle, | 686 extensions::BundleInstaller* bundle, |
686 const PermissionSet* permissions) { | 687 const PermissionSet* permissions) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 } | 945 } |
945 | 946 |
946 if (AutoConfirmPrompt(delegate_)) | 947 if (AutoConfirmPrompt(delegate_)) |
947 return; | 948 return; |
948 | 949 |
949 if (show_dialog_callback_.is_null()) | 950 if (show_dialog_callback_.is_null()) |
950 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_); | 951 GetDefaultShowDialogCallback().Run(show_params_, delegate_, prompt_); |
951 else | 952 else |
952 show_dialog_callback_.Run(show_params_, delegate_, prompt_); | 953 show_dialog_callback_.Run(show_params_, delegate_, prompt_); |
953 } | 954 } |
OLD | NEW |