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

Side by Side Diff: chrome/browser/ui/webui/extensions/install_extension_handler.cc

Issue 10388252: Refactoring ExtenionInstallUI to abstract the Browser references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor clean-ups Created 8 years, 7 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 (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/ui/webui/extensions/install_extension_handler.h" 5 #include "chrome/browser/ui/webui/extensions/install_extension_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_install_ui.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/extensions/extension_system.h" 12 #include "chrome/browser/extensions/extension_system.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/extensions/extension_switch_utils.h" 14 #include "chrome/common/extensions/extension_switch_utils.h"
15 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "content/public/browser/web_contents_view.h" 16 #include "content/public/browser/web_contents_view.h"
17 #include "content/public/browser/web_ui.h" 17 #include "content/public/browser/web_ui.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 #include "webkit/glue/webdropdata.h" 20 #include "webkit/glue/webdropdata.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) { 74 void InstallExtensionHandler::HandleInstallMessage(const ListValue* args) {
75 if (file_to_install_.empty()) { 75 if (file_to_install_.empty()) {
76 LOG(ERROR) << "No file captured to install."; 76 LOG(ERROR) << "No file captured to install.";
77 return; 77 return;
78 } 78 }
79 79
80 Profile* profile = Profile::FromWebUI(web_ui()); 80 Profile* profile = Profile::FromWebUI(web_ui());
81 scoped_refptr<CrxInstaller> crx_installer( 81 scoped_refptr<CrxInstaller> crx_installer(
82 CrxInstaller::Create( 82 CrxInstaller::Create(
83 ExtensionSystem::Get(profile)->extension_service(), 83 ExtensionSystem::Get(profile)->extension_service(),
84 new ExtensionInstallUI(profile))); 84 new ExtensionInstallPrompt(profile)));
85 crx_installer->InstallCrx(file_to_install_); 85 crx_installer->InstallCrx(file_to_install_);
86 86
87 file_to_install_.clear(); 87 file_to_install_.clear();
88 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698