| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 namespace blink { | 73 namespace blink { |
| 74 class WebSecurityOrigin; | 74 class WebSecurityOrigin; |
| 75 } | 75 } |
| 76 | 76 |
| 77 #if defined(ENABLE_WEBRTC) | 77 #if defined(ENABLE_WEBRTC) |
| 78 class WebRtcLoggingMessageFilter; | 78 class WebRtcLoggingMessageFilter; |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 namespace internal { |
| 82 |
| 83 extern const char kFlashYouTubeRewriteUMA[]; |
| 84 |
| 85 // Used for UMA. Values should not be reorderer or reused. |
| 86 // SUCCESS refers to an embed properly rewritten. SUCCESS_PARAMS_REWRITE refers |
| 87 // to an embed rewritten with the params fixed. SUCCESS_ENABLEJSAPI refers to |
| 88 // a rewritten embed even though the JS API was enabled (Chrome Android only). |
| 89 // FAILURE_ENABLEJSAPI indicates the embed was not rewritten because the |
| 90 // JS API was enabled. |
| 91 enum YouTubeRewriteStatus { |
| 92 SUCCESS = 0, |
| 93 SUCCESS_PARAMS_REWRITE = 1, |
| 94 SUCCESS_ENABLEJSAPI = 2, |
| 95 FAILURE_ENABLEJSAPI = 3, |
| 96 NUM_PLUGIN_ERROR // should be kept last |
| 97 }; |
| 98 |
| 99 } // namespace internal |
| 100 |
| 81 class ChromeContentRendererClient : public content::ContentRendererClient { | 101 class ChromeContentRendererClient : public content::ContentRendererClient { |
| 82 public: | 102 public: |
| 83 ChromeContentRendererClient(); | 103 ChromeContentRendererClient(); |
| 84 ~ChromeContentRendererClient() override; | 104 ~ChromeContentRendererClient() override; |
| 85 | 105 |
| 86 void RenderThreadStarted() override; | 106 void RenderThreadStarted() override; |
| 87 void RenderFrameCreated(content::RenderFrame* render_frame) override; | 107 void RenderFrameCreated(content::RenderFrame* render_frame) override; |
| 88 void RenderViewCreated(content::RenderView* render_view) override; | 108 void RenderViewCreated(content::RenderView* render_view) override; |
| 89 SkBitmap* GetSadPluginBitmap() override; | 109 SkBitmap* GetSadPluginBitmap() override; |
| 90 SkBitmap* GetSadWebViewBitmap() override; | 110 SkBitmap* GetSadWebViewBitmap() override; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override; | 179 void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override; |
| 160 void DidInitializeServiceWorkerContextOnWorkerThread( | 180 void DidInitializeServiceWorkerContextOnWorkerThread( |
| 161 v8::Local<v8::Context> context, | 181 v8::Local<v8::Context> context, |
| 162 int embedded_worker_id, | 182 int embedded_worker_id, |
| 163 const GURL& url) override; | 183 const GURL& url) override; |
| 164 void WillDestroyServiceWorkerContextOnWorkerThread( | 184 void WillDestroyServiceWorkerContextOnWorkerThread( |
| 165 v8::Local<v8::Context> context, | 185 v8::Local<v8::Context> context, |
| 166 int embedded_worker_id, | 186 int embedded_worker_id, |
| 167 const GURL& url) override; | 187 const GURL& url) override; |
| 168 bool ShouldEnforceWebRTCRoutingPreferences() override; | 188 bool ShouldEnforceWebRTCRoutingPreferences() override; |
| 169 | |
| 170 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; | 189 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; |
| 171 | 190 |
| 172 #if defined(ENABLE_SPELLCHECK) | 191 #if defined(ENABLE_SPELLCHECK) |
| 173 // Sets a new |spellcheck|. Used for testing only. | 192 // Sets a new |spellcheck|. Used for testing only. |
| 174 // Takes ownership of |spellcheck|. | 193 // Takes ownership of |spellcheck|. |
| 175 void SetSpellcheck(SpellCheck* spellcheck); | 194 void SetSpellcheck(SpellCheck* spellcheck); |
| 176 #endif | 195 #endif |
| 177 | 196 |
| 178 #if defined(ENABLE_PLUGINS) | 197 #if defined(ENABLE_PLUGINS) |
| 179 static blink::WebPlugin* CreatePlugin( | 198 static blink::WebPlugin* CreatePlugin( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 std::set<std::string> allowed_camera_device_origins_; | 253 std::set<std::string> allowed_camera_device_origins_; |
| 235 std::set<std::string> allowed_compositor_origins_; | 254 std::set<std::string> allowed_compositor_origins_; |
| 236 #endif | 255 #endif |
| 237 | 256 |
| 238 #if defined(OS_CHROMEOS) | 257 #if defined(OS_CHROMEOS) |
| 239 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; | 258 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; |
| 240 #endif | 259 #endif |
| 241 }; | 260 }; |
| 242 | 261 |
| 243 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 262 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |