| 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_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 static bool IsAdblockInstalled(); | 144 static bool IsAdblockInstalled(); |
| 145 static bool IsAdblockPlusInstalled(); | 145 static bool IsAdblockPlusInstalled(); |
| 146 static bool IsAdblockWithWebRequestInstalled(); | 146 static bool IsAdblockWithWebRequestInstalled(); |
| 147 static bool IsAdblockPlusWithWebRequestInstalled(); | 147 static bool IsAdblockPlusWithWebRequestInstalled(); |
| 148 static bool IsOtherExtensionWithWebRequestInstalled(); | 148 static bool IsOtherExtensionWithWebRequestInstalled(); |
| 149 | 149 |
| 150 private: | 150 private: |
| 151 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); | 151 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); |
| 152 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, | 152 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, |
| 153 IsRequestOSFileHandleAllowedForURL); | 153 IsRequestOSFileHandleAllowedForURL); |
| 154 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, |
| 155 SetOriginForSuggestionRequest); |
| 154 | 156 |
| 155 const extensions::Extension* GetExtension( | 157 const extensions::Extension* GetExtension( |
| 156 const WebKit::WebSecurityOrigin& origin) const; | 158 const WebKit::WebSecurityOrigin& origin) const; |
| 157 | 159 |
| 158 // Returns true if the frame is navigating to an URL either into or out of an | 160 // Returns true if the frame is navigating to an URL either into or out of an |
| 159 // extension app's extent. | 161 // extension app's extent. |
| 160 bool CrossesExtensionExtents(WebKit::WebFrame* frame, | 162 bool CrossesExtensionExtents(WebKit::WebFrame* frame, |
| 161 const GURL& new_url, | 163 const GURL& new_url, |
| 162 const ExtensionSet& extensions, | 164 const ExtensionSet& extensions, |
| 163 bool is_extension_url, | 165 bool is_extension_url, |
| 164 bool is_initial_navigation); | 166 bool is_initial_navigation); |
| 165 | 167 |
| 166 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, | 168 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, |
| 167 const webkit::WebPluginInfo& plugin); | 169 const webkit::WebPluginInfo& plugin); |
| 168 static bool IsNaClAllowed(const GURL& manifest_url, | 170 static bool IsNaClAllowed(const GURL& manifest_url, |
| 169 const GURL& top_url, | 171 const GURL& top_url, |
| 170 bool is_nacl_unrestricted, | 172 bool is_nacl_unrestricted, |
| 171 const extensions::Extension* extension, | 173 const extensions::Extension* extension, |
| 172 WebKit::WebPluginParams* params); | 174 WebKit::WebPluginParams* params); |
| 173 | 175 |
| 174 void RegisterRequestOSFileHandleAllowedHosts( | 176 void RegisterRequestOSFileHandleAllowedHosts( |
| 175 const std::string& allowed_list); | 177 const std::string& allowed_list); |
| 176 | 178 |
| 179 GURL SetOriginForSuggestionRequest( |
| 180 const GURL& url, |
| 181 const GURL& top_url) const; |
| 182 |
| 177 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; | 183 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; |
| 178 scoped_ptr<extensions::Dispatcher> extension_dispatcher_; | 184 scoped_ptr<extensions::Dispatcher> extension_dispatcher_; |
| 179 scoped_ptr<RendererNetPredictor> net_predictor_; | 185 scoped_ptr<RendererNetPredictor> net_predictor_; |
| 180 scoped_ptr<SpellCheck> spellcheck_; | 186 scoped_ptr<SpellCheck> spellcheck_; |
| 181 scoped_ptr<components::VisitedLinkSlave> visited_link_slave_; | 187 scoped_ptr<components::VisitedLinkSlave> visited_link_slave_; |
| 182 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 188 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
| 183 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; | 189 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; |
| 184 // The whitelist for RequestOSFileHandle specified by commandline. | 190 // The whitelist for RequestOSFileHandle specified by commandline. |
| 185 std::vector<std::string> request_os_file_handle_allowed_hosts_; | 191 std::vector<std::string> request_os_file_handle_allowed_hosts_; |
| 186 }; | 192 }; |
| 187 | 193 |
| 188 } // namespace chrome | 194 } // namespace chrome |
| 189 | 195 |
| 190 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 196 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |