| 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 <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "chrome/browser/extensions/webstore_standalone_installer.h" | 11 #include "chrome/browser/extensions/webstore_standalone_installer.h" |
| 11 #include "chrome/browser/ui/native_window_tracker.h" | 12 #include "chrome/browser/ui/native_window_tracker.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
| 13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 class WebContents; | 17 class WebContents; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace extensions { | 20 namespace extensions { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 48 ~WebstoreInstallWithPrompt() override; | 49 ~WebstoreInstallWithPrompt() override; |
| 49 | 50 |
| 50 void set_show_post_install_ui(bool show) { show_post_install_ui_ = show; } | 51 void set_show_post_install_ui(bool show) { show_post_install_ui_ = show; } |
| 51 | 52 |
| 52 // extensions::WebstoreStandaloneInstaller overrides: | 53 // extensions::WebstoreStandaloneInstaller overrides: |
| 53 bool CheckRequestorAlive() const override; | 54 bool CheckRequestorAlive() const override; |
| 54 const GURL& GetRequestorURL() const override; | 55 const GURL& GetRequestorURL() const override; |
| 55 bool ShouldShowPostInstallUI() const override; | 56 bool ShouldShowPostInstallUI() const override; |
| 56 bool ShouldShowAppInstalledBubble() const override; | 57 bool ShouldShowAppInstalledBubble() const override; |
| 57 content::WebContents* GetWebContents() const override; | 58 content::WebContents* GetWebContents() const override; |
| 58 scoped_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() | 59 std::unique_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() |
| 59 const override; | 60 const override; |
| 60 scoped_ptr<ExtensionInstallPrompt> CreateInstallUI() override; | 61 std::unique_ptr<ExtensionInstallPrompt> CreateInstallUI() override; |
| 61 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data, | 62 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data, |
| 62 std::string* error) const override; | 63 std::string* error) const override; |
| 63 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data, | 64 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data, |
| 64 std::string* error) const override; | 65 std::string* error) const override; |
| 65 | 66 |
| 66 private: | 67 private: |
| 67 bool show_post_install_ui_; | 68 bool show_post_install_ui_; |
| 68 | 69 |
| 69 GURL dummy_requestor_url_; | 70 GURL dummy_requestor_url_; |
| 70 | 71 |
| 71 // A non-visible WebContents used to download data from the webstore. | 72 // A non-visible WebContents used to download data from the webstore. |
| 72 scoped_ptr<content::WebContents> dummy_web_contents_; | 73 std::unique_ptr<content::WebContents> dummy_web_contents_; |
| 73 | 74 |
| 74 gfx::NativeWindow parent_window_; | 75 gfx::NativeWindow parent_window_; |
| 75 scoped_ptr<NativeWindowTracker> parent_window_tracker_; | 76 std::unique_ptr<NativeWindowTracker> parent_window_tracker_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPrompt); | 78 DISALLOW_COPY_AND_ASSIGN(WebstoreInstallWithPrompt); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace extensions | 81 } // namespace extensions |
| 81 | 82 |
| 82 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ | 83 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALL_WITH_PROMPT_H_ |
| OLD | NEW |