OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/app_list/search/webstore_installer.h" | |
6 | |
7 #include "chrome/browser/extensions/extension_install_prompt.h" | |
8 #include "chrome/browser/ui/browser_finder.h" | |
9 | |
10 namespace app_list { | |
11 | |
12 WebstoreInstaller::WebstoreInstaller(const std::string& webstore_item_id, | |
13 Profile* profile, | |
14 gfx::NativeWindow parent_window, | |
15 const Callback& callback) | |
16 : WebstoreStartupInstaller(webstore_item_id, profile, true, callback), | |
17 profile_(profile), | |
18 parent_window_(parent_window) {} | |
19 | |
20 WebstoreInstaller::~WebstoreInstaller() {} | |
21 | |
22 scoped_ptr<ExtensionInstallPrompt> WebstoreInstaller::CreateInstallUI() { | |
23 return make_scoped_ptr( | |
24 new ExtensionInstallPrompt(profile_, parent_window_, this)); | |
25 } | |
26 | |
27 content::WebContents* WebstoreInstaller::OpenURL( | |
28 const content::OpenURLParams& params) { | |
29 Browser* browser = chrome::FindOrCreateTabbedBrowser( | |
30 profile_, chrome::GetActiveDesktop()); | |
31 return browser->OpenURL(params); | |
32 } | |
33 | |
34 } // namespace app_list | |
OLD | NEW |