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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher.cc

Issue 660643002: [Refactor] Move creating a browser if necessary to ExtensionInstallDialogView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/apps/ephemeral_app_launcher.h" 5 #include "chrome/browser/apps/ephemeral_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_install_checker.h" 9 #include "chrome/browser/extensions/extension_install_checker.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 scoped_ptr<extensions::ExtensionInstallChecker> 181 scoped_ptr<extensions::ExtensionInstallChecker>
182 EphemeralAppLauncher::CreateInstallChecker() { 182 EphemeralAppLauncher::CreateInstallChecker() {
183 return make_scoped_ptr(new ExtensionInstallChecker(profile())); 183 return make_scoped_ptr(new ExtensionInstallChecker(profile()));
184 } 184 }
185 185
186 scoped_ptr<ExtensionInstallPrompt> EphemeralAppLauncher::CreateInstallUI() { 186 scoped_ptr<ExtensionInstallPrompt> EphemeralAppLauncher::CreateInstallUI() {
187 if (web_contents()) 187 if (web_contents())
188 return make_scoped_ptr(new ExtensionInstallPrompt(web_contents())); 188 return make_scoped_ptr(new ExtensionInstallPrompt(web_contents()));
189 189
190 return make_scoped_ptr( 190 return make_scoped_ptr(new ExtensionInstallPrompt(profile(), parent_window_));
191 new ExtensionInstallPrompt(profile(), parent_window_, NULL));
192 } 191 }
193 192
194 scoped_ptr<WebstoreInstaller::Approval> EphemeralAppLauncher::CreateApproval() 193 scoped_ptr<WebstoreInstaller::Approval> EphemeralAppLauncher::CreateApproval()
195 const { 194 const {
196 scoped_ptr<WebstoreInstaller::Approval> approval = 195 scoped_ptr<WebstoreInstaller::Approval> approval =
197 WebstoreStandaloneInstaller::CreateApproval(); 196 WebstoreStandaloneInstaller::CreateApproval();
198 approval->is_ephemeral = true; 197 approval->is_ephemeral = true;
199 return approval.Pass(); 198 return approval.Pass();
200 } 199 }
201 200
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 455
457 // CompleteInstall will call Release. 456 // CompleteInstall will call Release.
458 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS, 457 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS,
459 std::string()); 458 std::string());
460 } 459 }
461 460
462 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 461 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
463 // CompleteInstall will call Release. 462 // CompleteInstall will call Release.
464 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError); 463 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
465 } 464 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_install_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698