| 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 |
| 11 #if defined(ENABLE_PLUGINS) | 11 #if defined(ENABLE_PLUGINS) |
| 12 #include <set> | 12 #include <set> |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "content/public/renderer/content_renderer_client.h" | 18 #include "content/public/renderer/content_renderer_client.h" |
| 19 | 19 |
| 20 class ChromeRenderProcessObserver; | 20 class ChromeRenderProcessObserver; |
| 21 class ExtensionSet; | 21 class ExtensionSet; |
| 22 class PrescientNetworkingDispatcher; | 22 class PrescientNetworkingDispatcher; |
| 23 class RendererNetPredictor; | 23 class RendererNetPredictor; |
| 24 class SearchBouncer; |
| 24 #if defined(ENABLE_SPELLCHECK) | 25 #if defined(ENABLE_SPELLCHECK) |
| 25 class SpellCheck; | 26 class SpellCheck; |
| 26 class SpellCheckProvider; | 27 class SpellCheckProvider; |
| 27 #endif | 28 #endif |
| 28 | 29 |
| 29 struct ChromeViewHostMsg_GetPluginInfo_Output; | 30 struct ChromeViewHostMsg_GetPluginInfo_Output; |
| 30 | 31 |
| 31 namespace content { | 32 namespace content { |
| 32 struct WebPluginInfo; | 33 struct WebPluginInfo; |
| 33 } | 34 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual bool OverrideCreatePlugin( | 75 virtual bool OverrideCreatePlugin( |
| 75 content::RenderView* render_view, | 76 content::RenderView* render_view, |
| 76 WebKit::WebFrame* frame, | 77 WebKit::WebFrame* frame, |
| 77 const WebKit::WebPluginParams& params, | 78 const WebKit::WebPluginParams& params, |
| 78 WebKit::WebPlugin** plugin) OVERRIDE; | 79 WebKit::WebPlugin** plugin) OVERRIDE; |
| 79 virtual WebKit::WebPlugin* CreatePluginReplacement( | 80 virtual WebKit::WebPlugin* CreatePluginReplacement( |
| 80 content::RenderView* render_view, | 81 content::RenderView* render_view, |
| 81 const base::FilePath& plugin_path) OVERRIDE; | 82 const base::FilePath& plugin_path) OVERRIDE; |
| 82 virtual bool HasErrorPage(int http_status_code, | 83 virtual bool HasErrorPage(int http_status_code, |
| 83 std::string* error_domain) OVERRIDE; | 84 std::string* error_domain) OVERRIDE; |
| 85 virtual bool ShouldSuppressErrorPage(const GURL& url) OVERRIDE; |
| 84 virtual void GetNavigationErrorStrings( | 86 virtual void GetNavigationErrorStrings( |
| 85 WebKit::WebFrame* frame, | 87 WebKit::WebFrame* frame, |
| 86 const WebKit::WebURLRequest& failed_request, | 88 const WebKit::WebURLRequest& failed_request, |
| 87 const WebKit::WebURLError& error, | 89 const WebKit::WebURLError& error, |
| 88 std::string* error_html, | 90 std::string* error_html, |
| 89 string16* error_description) OVERRIDE; | 91 string16* error_description) OVERRIDE; |
| 90 virtual void DeferMediaLoad(content::RenderView* render_view, | 92 virtual void DeferMediaLoad(content::RenderView* render_view, |
| 91 const base::Closure& closure) OVERRIDE; | 93 const base::Closure& closure) OVERRIDE; |
| 92 virtual bool RunIdleHandlerWhenWidgetsHidden() OVERRIDE; | 94 virtual bool RunIdleHandlerWhenWidgetsHidden() OVERRIDE; |
| 93 virtual bool AllowPopup() OVERRIDE; | 95 virtual bool AllowPopup() OVERRIDE; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // TODO(mpcomplete): remove after we collect histogram data. | 167 // TODO(mpcomplete): remove after we collect histogram data. |
| 166 // http://crbug.com/100411 | 168 // http://crbug.com/100411 |
| 167 static bool IsAdblockInstalled(); | 169 static bool IsAdblockInstalled(); |
| 168 static bool IsAdblockPlusInstalled(); | 170 static bool IsAdblockPlusInstalled(); |
| 169 static bool IsAdblockWithWebRequestInstalled(); | 171 static bool IsAdblockWithWebRequestInstalled(); |
| 170 static bool IsAdblockPlusWithWebRequestInstalled(); | 172 static bool IsAdblockPlusWithWebRequestInstalled(); |
| 171 static bool IsOtherExtensionWithWebRequestInstalled(); | 173 static bool IsOtherExtensionWithWebRequestInstalled(); |
| 172 | 174 |
| 173 private: | 175 private: |
| 174 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); | 176 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); |
| 177 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, |
| 178 ShouldSuppressErrorPage); |
| 175 | 179 |
| 176 // Gets extension by the given origin, regardless of whether the extension | 180 // Gets extension by the given origin, regardless of whether the extension |
| 177 // is active in the current process. | 181 // is active in the current process. |
| 178 const extensions::Extension* GetExtensionByOrigin( | 182 const extensions::Extension* GetExtensionByOrigin( |
| 179 const WebKit::WebSecurityOrigin& origin) const; | 183 const WebKit::WebSecurityOrigin& origin) const; |
| 180 | 184 |
| 181 // Returns true if the frame is navigating to an URL either into or out of an | 185 // Returns true if the frame is navigating to an URL either into or out of an |
| 182 // extension app's extent. | 186 // extension app's extent. |
| 183 bool CrossesExtensionExtents(WebKit::WebFrame* frame, | 187 bool CrossesExtensionExtents(WebKit::WebFrame* frame, |
| 184 const GURL& new_url, | 188 const GURL& new_url, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 202 scoped_ptr<RendererNetPredictor> net_predictor_; | 206 scoped_ptr<RendererNetPredictor> net_predictor_; |
| 203 #if defined(ENABLE_SPELLCHECK) | 207 #if defined(ENABLE_SPELLCHECK) |
| 204 scoped_ptr<SpellCheck> spellcheck_; | 208 scoped_ptr<SpellCheck> spellcheck_; |
| 205 #endif | 209 #endif |
| 206 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_; | 210 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_; |
| 207 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 211 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
| 208 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; | 212 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; |
| 209 #if defined(ENABLE_WEBRTC) | 213 #if defined(ENABLE_WEBRTC) |
| 210 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; | 214 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; |
| 211 #endif | 215 #endif |
| 216 scoped_ptr<SearchBouncer> search_bouncer_; |
| 212 | 217 |
| 213 #if defined(ENABLE_PLUGINS) | 218 #if defined(ENABLE_PLUGINS) |
| 214 std::set<std::string> allowed_file_handle_origins_; | 219 std::set<std::string> allowed_file_handle_origins_; |
| 215 #endif | 220 #endif |
| 216 }; | 221 }; |
| 217 | 222 |
| 218 } // namespace chrome | 223 } // namespace chrome |
| 219 | 224 |
| 220 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 225 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |