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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 explicit ProgrammableInstallPrompt(WebContents* contents) | 50 explicit ProgrammableInstallPrompt(WebContents* contents) |
51 : ExtensionInstallPrompt(contents) | 51 : ExtensionInstallPrompt(contents) |
52 {} | 52 {} |
53 | 53 |
54 virtual ~ProgrammableInstallPrompt() {} | 54 virtual ~ProgrammableInstallPrompt() {} |
55 | 55 |
56 virtual void ConfirmStandaloneInstall( | 56 virtual void ConfirmStandaloneInstall( |
57 Delegate* delegate, | 57 Delegate* delegate, |
58 const Extension* extension, | 58 const Extension* extension, |
59 SkBitmap* icon, | 59 SkBitmap* icon, |
60 const ExtensionInstallPrompt::Prompt& prompt) OVERRIDE { | 60 scoped_refptr<ExtensionInstallPrompt::Prompt> prompt) OVERRIDE { |
61 delegate_ = delegate; | 61 delegate_ = delegate; |
62 } | 62 } |
63 | 63 |
64 static bool Ready() { | 64 static bool Ready() { |
65 return delegate_ != NULL; | 65 return delegate_ != NULL; |
66 } | 66 } |
67 | 67 |
68 static void Accept() { | 68 static void Accept() { |
69 delegate_->InstallUIProceed(); | 69 delegate_->InstallUIProceed(); |
70 } | 70 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, | 190 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, |
191 DownloadProgressListenerTest) { | 191 DownloadProgressListenerTest) { |
192 RunTest("download_progress_listener.html"); | 192 RunTest("download_progress_listener.html"); |
193 } | 193 } |
194 | 194 |
195 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { | 195 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { |
196 RunTest("both_listeners.html"); | 196 RunTest("both_listeners.html"); |
197 } | 197 } |
198 | 198 |
199 } // namespace extensions | 199 } // namespace extensions |
OLD | NEW |