| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 #if defined(ENABLE_WEBRTC) | 73 #if defined(ENABLE_WEBRTC) |
| 74 class WebRtcLoggingMessageFilter; | 74 class WebRtcLoggingMessageFilter; |
| 75 #endif | 75 #endif |
| 76 | 76 |
| 77 class ChromeContentRendererClient : public content::ContentRendererClient { | 77 class ChromeContentRendererClient : public content::ContentRendererClient { |
| 78 public: | 78 public: |
| 79 ChromeContentRendererClient(); | 79 ChromeContentRendererClient(); |
| 80 ~ChromeContentRendererClient() override; | 80 ~ChromeContentRendererClient() override; |
| 81 | 81 |
| 82 void RendererMainEntered() override; |
| 82 void RenderThreadStarted() override; | 83 void RenderThreadStarted() override; |
| 83 void RenderFrameCreated(content::RenderFrame* render_frame) override; | 84 void RenderFrameCreated(content::RenderFrame* render_frame) override; |
| 84 void RenderViewCreated(content::RenderView* render_view) override; | 85 void RenderViewCreated(content::RenderView* render_view) override; |
| 85 SkBitmap* GetSadPluginBitmap() override; | 86 SkBitmap* GetSadPluginBitmap() override; |
| 86 SkBitmap* GetSadWebViewBitmap() override; | 87 SkBitmap* GetSadWebViewBitmap() override; |
| 87 bool OverrideCreatePlugin(content::RenderFrame* render_frame, | 88 bool OverrideCreatePlugin(content::RenderFrame* render_frame, |
| 88 blink::WebLocalFrame* frame, | 89 blink::WebLocalFrame* frame, |
| 89 const blink::WebPluginParams& params, | 90 const blink::WebPluginParams& params, |
| 90 blink::WebPlugin** plugin) override; | 91 blink::WebPlugin** plugin) override; |
| 91 blink::WebPlugin* CreatePluginReplacement( | 92 blink::WebPlugin* CreatePluginReplacement( |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 #endif | 179 #endif |
| 179 | 180 |
| 180 private: | 181 private: |
| 181 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); | 182 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); |
| 182 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, | 183 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, |
| 183 ShouldSuppressErrorPage); | 184 ShouldSuppressErrorPage); |
| 184 | 185 |
| 185 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, | 186 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, |
| 186 const content::WebPluginInfo& plugin); | 187 const content::WebPluginInfo& plugin); |
| 187 | 188 |
| 189 // Time at which the RendererMain function was entered. |
| 190 base::TimeTicks renderer_main_entry_time_; |
| 191 |
| 188 #if !defined(DISABLE_NACL) | 192 #if !defined(DISABLE_NACL) |
| 189 // Determines if a NaCl app is allowed, and modifies params to pass the app's | 193 // Determines if a NaCl app is allowed, and modifies params to pass the app's |
| 190 // permissions to the trusted NaCl plugin. | 194 // permissions to the trusted NaCl plugin. |
| 191 static bool IsNaClAllowed(const GURL& manifest_url, | 195 static bool IsNaClAllowed(const GURL& manifest_url, |
| 192 const GURL& app_url, | 196 const GURL& app_url, |
| 193 bool is_nacl_unrestricted, | 197 bool is_nacl_unrestricted, |
| 194 const extensions::Extension* extension, | 198 const extensions::Extension* extension, |
| 195 blink::WebPluginParams* params); | 199 blink::WebPluginParams* params); |
| 196 #endif | 200 #endif |
| 197 | 201 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 215 #if defined(ENABLE_PRINT_PREVIEW) | 219 #if defined(ENABLE_PRINT_PREVIEW) |
| 216 scoped_ptr<ChromePDFPrintClient> pdf_print_client_; | 220 scoped_ptr<ChromePDFPrintClient> pdf_print_client_; |
| 217 #endif | 221 #endif |
| 218 #if defined(ENABLE_PLUGINS) | 222 #if defined(ENABLE_PLUGINS) |
| 219 std::set<std::string> allowed_camera_device_origins_; | 223 std::set<std::string> allowed_camera_device_origins_; |
| 220 std::set<std::string> allowed_compositor_origins_; | 224 std::set<std::string> allowed_compositor_origins_; |
| 221 #endif | 225 #endif |
| 222 }; | 226 }; |
| 223 | 227 |
| 224 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 228 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |