Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer_browsertest.cc

Issue 313203004: Make ExtensionInstallPrompt::Prompt ref-counted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | chrome/browser/extensions/webstore_install_with_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698