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 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_INSTALLER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_INSTALLER_H_
10 #include "base/basictypes.h"
11 #include "chrome/browser/extensions/webstore_startup_installer.h"
12 #include "content/public/browser/page_navigator.h"
18 // WebstoreInstaller handles install for web store search results.
19 class WebstoreInstaller
: public extensions::WebstoreStartupInstaller
,
20 public content::PageNavigator
{
22 typedef WebstoreStandaloneInstaller::Callback Callback
;
24 WebstoreInstaller(const std::string
& webstore_item_id
,
26 gfx::NativeWindow parent_window
,
27 const Callback
& callback
);
30 friend class base::RefCountedThreadSafe
<WebstoreInstaller
>;
32 virtual ~WebstoreInstaller();
34 // extensions::WebstoreStartupInstaller overrides:
35 virtual scoped_ptr
<ExtensionInstallPrompt
> CreateInstallUI() OVERRIDE
;
37 // content::PageNavigator overrides:
38 virtual content::WebContents
* OpenURL(
39 const content::OpenURLParams
& params
) OVERRIDE
;
42 gfx::NativeWindow parent_window_
;
44 DISALLOW_COPY_AND_ASSIGN(WebstoreInstaller
);
47 } // namespace app_list
49 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_INSTALLER_H_