OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/webstore_standalone_installer.h" | 5 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/extensions/crx_installer.h" | 8 #include "chrome/browser/extensions/crx_installer.h" |
9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } // else extension is installed and enabled; no work to be done. | 247 } // else extension is installed and enabled; no work to be done. |
248 CompleteInstall(install_result); | 248 CompleteInstall(install_result); |
249 return; | 249 return; |
250 } | 250 } |
251 | 251 |
252 scoped_ptr<WebstoreInstaller::Approval> approval = CreateApproval(); | 252 scoped_ptr<WebstoreInstaller::Approval> approval = CreateApproval(); |
253 | 253 |
254 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( | 254 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( |
255 profile_, | 255 profile_, |
256 this, | 256 this, |
257 &(GetWebContents()->GetController()), | 257 GetWebContents(), |
258 id_, | 258 id_, |
259 approval.Pass(), | 259 approval.Pass(), |
260 install_source_); | 260 install_source_); |
261 installer->Start(); | 261 installer->Start(); |
262 } | 262 } |
263 | 263 |
264 void WebstoreStandaloneInstaller::InstallUIAbort(bool user_initiated) { | 264 void WebstoreStandaloneInstaller::InstallUIAbort(bool user_initiated) { |
265 CompleteInstall(kUserCancelledError); | 265 CompleteInstall(kUserCancelledError); |
266 Release(); // Balanced in ShowInstallUI. | 266 Release(); // Balanced in ShowInstallUI. |
267 } | 267 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via | 321 // Balanced in InstallUIAbort or indirectly in InstallUIProceed via |
322 // OnExtensionInstallSuccess or OnExtensionInstallFailure. | 322 // OnExtensionInstallSuccess or OnExtensionInstallFailure. |
323 AddRef(); | 323 AddRef(); |
324 | 324 |
325 install_ui_ = CreateInstallUI(); | 325 install_ui_ = CreateInstallUI(); |
326 install_ui_->ConfirmStandaloneInstall( | 326 install_ui_->ConfirmStandaloneInstall( |
327 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); | 327 this, localized_extension_for_display_.get(), &icon_, *install_prompt_); |
328 } | 328 } |
329 | 329 |
330 } // namespace extensions | 330 } // namespace extensions |
OLD | NEW |