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