| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_INLINE_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 friend class base::RefCountedThreadSafe<WebstoreInlineInstaller>; | 47 friend class base::RefCountedThreadSafe<WebstoreInlineInstaller>; |
| 48 | 48 |
| 49 ~WebstoreInlineInstaller() override; | 49 ~WebstoreInlineInstaller() override; |
| 50 | 50 |
| 51 // Implementations WebstoreStandaloneInstaller Template Method's hooks. | 51 // Implementations WebstoreStandaloneInstaller Template Method's hooks. |
| 52 bool CheckRequestorAlive() const override; | 52 bool CheckRequestorAlive() const override; |
| 53 const GURL& GetRequestorURL() const override; | 53 const GURL& GetRequestorURL() const override; |
| 54 bool ShouldShowPostInstallUI() const override; | 54 bool ShouldShowPostInstallUI() const override; |
| 55 bool ShouldShowAppInstalledBubble() const override; | 55 bool ShouldShowAppInstalledBubble() const override; |
| 56 content::WebContents* GetWebContents() const override; | 56 content::WebContents* GetWebContents() const override; |
| 57 scoped_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() | 57 std::unique_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() |
| 58 const override; | 58 const override; |
| 59 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data, | 59 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data, |
| 60 std::string* error) const override; | 60 std::string* error) const override; |
| 61 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data, | 61 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data, |
| 62 std::string* error) const override; | 62 std::string* error) const override; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // content::WebContentsObserver interface implementation. | 65 // content::WebContentsObserver interface implementation. |
| 66 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, | 66 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, |
| 67 const content::LoadCommittedDetails& details, | 67 const content::LoadCommittedDetails& details, |
| 68 const content::FrameNavigateParams& params) override; | 68 const content::FrameNavigateParams& params) override; |
| 69 void WebContentsDestroyed() override; | 69 void WebContentsDestroyed() override; |
| 70 | 70 |
| 71 // Checks whether the install is initiated by a page in a verified site | 71 // Checks whether the install is initiated by a page in a verified site |
| 72 // (which is at least a domain, but can also have a port or a path). | 72 // (which is at least a domain, but can also have a port or a path). |
| 73 static bool IsRequestorURLInVerifiedSite(const GURL& requestor_url, | 73 static bool IsRequestorURLInVerifiedSite(const GURL& requestor_url, |
| 74 const std::string& verified_site); | 74 const std::string& verified_site); |
| 75 | 75 |
| 76 // This corresponds to the frame that initiated the install request. | 76 // This corresponds to the frame that initiated the install request. |
| 77 content::RenderFrameHost* host_; | 77 content::RenderFrameHost* host_; |
| 78 GURL requestor_url_; | 78 GURL requestor_url_; |
| 79 | 79 |
| 80 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller); | 80 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace extensions | 83 } // namespace extensions |
| 84 | 84 |
| 85 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ |
| OLD | NEW |