OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/extensions/webstore_standalone_installer.h" | 10 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // |parent_window|. | 41 // |parent_window|. |
42 WebstoreInstallWithPrompt(const std::string& webstore_item_id, | 42 WebstoreInstallWithPrompt(const std::string& webstore_item_id, |
43 Profile* profile, | 43 Profile* profile, |
44 gfx::NativeWindow parent_window, | 44 gfx::NativeWindow parent_window, |
45 const Callback& callback); | 45 const Callback& callback); |
46 | 46 |
47 protected: | 47 protected: |
48 friend class base::RefCountedThreadSafe<WebstoreInstallWithPrompt>; | 48 friend class base::RefCountedThreadSafe<WebstoreInstallWithPrompt>; |
49 virtual ~WebstoreInstallWithPrompt(); | 49 virtual ~WebstoreInstallWithPrompt(); |
50 | 50 |
| 51 void set_show_post_install_ui(bool show) { show_post_install_ui_ = show; } |
| 52 |
51 // extensions::WebstoreStandaloneInstaller overrides: | 53 // extensions::WebstoreStandaloneInstaller overrides: |
52 virtual bool CheckRequestorAlive() const OVERRIDE; | 54 virtual bool CheckRequestorAlive() const OVERRIDE; |
53 virtual const GURL& GetRequestorURL() const OVERRIDE; | 55 virtual const GURL& GetRequestorURL() const OVERRIDE; |
54 virtual bool ShouldShowPostInstallUI() const OVERRIDE; | 56 virtual bool ShouldShowPostInstallUI() const OVERRIDE; |
55 virtual bool ShouldShowAppInstalledBubble() const OVERRIDE; | 57 virtual bool ShouldShowAppInstalledBubble() const OVERRIDE; |
56 virtual content::WebContents* GetWebContents() const OVERRIDE; | 58 virtual content::WebContents* GetWebContents() const OVERRIDE; |
57 virtual scoped_refptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() | 59 virtual scoped_refptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() |
58 const OVERRIDE; | 60 const OVERRIDE; |
59 virtual scoped_ptr<ExtensionInstallPrompt> CreateInstallUI() OVERRIDE; | 61 virtual scoped_ptr<ExtensionInstallPrompt> CreateInstallUI() OVERRIDE; |
60 virtual bool CheckInlineInstallPermitted( | 62 virtual bool CheckInlineInstallPermitted( |
61 const base::DictionaryValue& webstore_data, | 63 const base::DictionaryValue& webstore_data, |
62 std::string* error) const OVERRIDE; | 64 std::string* error) const OVERRIDE; |
63 virtual bool CheckRequestorPermitted( | 65 virtual bool CheckRequestorPermitted( |
64 const base::DictionaryValue& webstore_data, | 66 const base::DictionaryValue& webstore_data, |
65 std::string* error) const OVERRIDE; | 67 std::string* error) const OVERRIDE; |
66 | 68 |
67 // content::PageNavigator overrides: | 69 // content::PageNavigator overrides: |
68 virtual content::WebContents* OpenURL( | 70 virtual content::WebContents* OpenURL( |
69 const content::OpenURLParams& params) OVERRIDE; | 71 const content::OpenURLParams& params) OVERRIDE; |
70 | 72 |
71 private: | 73 private: |
| 74 bool show_post_install_ui_; |
| 75 |
72 GURL dummy_requestor_url_; | 76 GURL dummy_requestor_url_; |
73 | 77 |
74 // A non-visible WebContents used to download data from the webstore. | 78 // A non-visible WebContents used to download data from the webstore. |
75 scoped_ptr<content::WebContents> dummy_web_contents_; | 79 scoped_ptr<content::WebContents> dummy_web_contents_; |
76 | 80 |
77 gfx::NativeWindow parent_window_; | 81 gfx::NativeWindow parent_window_; |
78 | 82 |
79 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPrompt); | 83 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPrompt); |
80 }; | 84 }; |
81 | 85 |
82 } // namespace extensions | 86 } // namespace extensions |
83 | 87 |
84 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ | 88 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ |
OLD | NEW |