Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: chrome/browser/extensions/webstore_inline_installer.h

Issue 2678843003: Convert WebstoreInlineInstaller to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_inline_installer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 content::WebContents* GetWebContents() const override; 58 content::WebContents* GetWebContents() const override;
59 std::unique_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt() 59 std::unique_ptr<ExtensionInstallPrompt::Prompt> CreateInstallPrompt()
60 const override; 60 const override;
61 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data, 61 bool CheckInlineInstallPermitted(const base::DictionaryValue& webstore_data,
62 std::string* error) const override; 62 std::string* error) const override;
63 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data, 63 bool CheckRequestorPermitted(const base::DictionaryValue& webstore_data,
64 std::string* error) const override; 64 std::string* error) const override;
65 65
66 private: 66 private:
67 // content::WebContentsObserver interface implementation. 67 // content::WebContentsObserver interface implementation.
68 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, 68 void DidFinishNavigation(
69 const content::LoadCommittedDetails& details, 69 content::NavigationHandle* navigation_handle) override;
70 const content::FrameNavigateParams& params) override;
71 void WebContentsDestroyed() override; 70 void WebContentsDestroyed() override;
72 71
73 // Checks whether the install is initiated by a page in a verified site 72 // Checks whether the install is initiated by a page in a verified site
74 // (which is at least a domain, but can also have a port or a path). 73 // (which is at least a domain, but can also have a port or a path).
75 static bool IsRequestorURLInVerifiedSite(const GURL& requestor_url, 74 static bool IsRequestorURLInVerifiedSite(const GURL& requestor_url,
76 const std::string& verified_site); 75 const std::string& verified_site);
77 76
78 // This corresponds to the frame that initiated the install request. 77 // This corresponds to the frame that initiated the install request.
79 content::RenderFrameHost* host_; 78 content::RenderFrameHost* host_;
80 GURL requestor_url_; 79 GURL requestor_url_;
81 80
82 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller); 81 DISALLOW_IMPLICIT_CONSTRUCTORS(WebstoreInlineInstaller);
83 }; 82 };
84 83
85 } // namespace extensions 84 } // namespace extensions
86 85
87 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_ 86 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INLINE_INSTALLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_inline_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698