| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/extensions/extension_install_prompt.h" | 6 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/tab_helper.h" | 8 #include "chrome/browser/extensions/tab_helper.h" |
| 9 #include "chrome/browser/extensions/webstore_inline_installer.h" | 9 #include "chrome/browser/extensions/webstore_inline_installer.h" |
| 10 #include "chrome/browser/extensions/webstore_inline_installer_factory.h" | 10 #include "chrome/browser/extensions/webstore_inline_installer_factory.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 programmable_prompt_ = new ProgrammableInstallPrompt(web_contents()); | 99 programmable_prompt_ = new ProgrammableInstallPrompt(web_contents()); |
| 100 return make_scoped_ptr(programmable_prompt_). | 100 return make_scoped_ptr(programmable_prompt_). |
| 101 PassAs<ExtensionInstallPrompt>(); | 101 PassAs<ExtensionInstallPrompt>(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 virtual ~WebstoreInlineInstallerForTest() {} | 105 virtual ~WebstoreInlineInstallerForTest() {} |
| 106 | 106 |
| 107 friend class base::RefCountedThreadSafe<WebstoreStandaloneInstaller>; | 107 friend class base::RefCountedThreadSafe<WebstoreStandaloneInstaller>; |
| 108 | 108 |
| 109 static void DummyCallback(bool /*success*/, const std::string& /*error*/) { | 109 static void DummyCallback(bool success, |
| 110 const std::string& error, |
| 111 webstore_install::Result result) { |
| 110 } | 112 } |
| 111 | 113 |
| 112 ProgrammableInstallPrompt* programmable_prompt_; | 114 ProgrammableInstallPrompt* programmable_prompt_; |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 class WebstoreInlineInstallerForTestFactory : | 117 class WebstoreInlineInstallerForTestFactory : |
| 116 public WebstoreInlineInstallerFactory { | 118 public WebstoreInlineInstallerFactory { |
| 117 virtual ~WebstoreInlineInstallerForTestFactory() {} | 119 virtual ~WebstoreInlineInstallerForTestFactory() {} |
| 118 virtual WebstoreInlineInstaller* CreateInstaller( | 120 virtual WebstoreInlineInstaller* CreateInstaller( |
| 119 WebContents* contents, | 121 WebContents* contents, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, | 192 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, |
| 191 DownloadProgressListenerTest) { | 193 DownloadProgressListenerTest) { |
| 192 RunTest("download_progress_listener.html"); | 194 RunTest("download_progress_listener.html"); |
| 193 } | 195 } |
| 194 | 196 |
| 195 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { | 197 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { |
| 196 RunTest("both_listeners.html"); | 198 RunTest("both_listeners.html"); |
| 197 } | 199 } |
| 198 | 200 |
| 199 } // namespace extensions | 201 } // namespace extensions |
| OLD | NEW |