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 "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 Loading... |
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 Loading... |
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 } |
OLD | NEW |