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.
5 #include "chrome/browser/ui/app_list/search/webstore_installer.h"
7 #include "chrome/browser/extensions/extension_install_prompt.h"
8 #include "chrome/browser/ui/browser_finder.h"
12 WebstoreInstaller::WebstoreInstaller(const std::string
& webstore_item_id
,
14 gfx::NativeWindow parent_window
,
15 const Callback
& callback
)
16 : WebstoreStartupInstaller(webstore_item_id
, profile
, true, callback
),
18 parent_window_(parent_window
) {}
20 WebstoreInstaller::~WebstoreInstaller() {}
22 scoped_ptr
<ExtensionInstallPrompt
> WebstoreInstaller::CreateInstallUI() {
23 return make_scoped_ptr(
24 new ExtensionInstallPrompt(profile_
, parent_window_
, this));
27 content::WebContents
* WebstoreInstaller::OpenURL(
28 const content::OpenURLParams
& params
) {
29 Browser
* browser
= chrome::FindOrCreateTabbedBrowser(
30 profile_
, chrome::GetActiveDesktop());
31 return browser
->OpenURL(params
);
34 } // namespace app_list