OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ |
6 #define CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ | 6 #define CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/public/renderer/content_renderer_client.h" | 11 #include "content/public/renderer/content_renderer_client.h" |
12 | 12 |
13 namespace dns_prefetch { | 13 namespace dns_prefetch { |
14 class PrescientNetworkingDispatcher; | 14 class PrescientNetworkingDispatcher; |
15 } // namespace dns_prefetch | 15 } // namespace dns_prefetch |
16 | 16 |
17 namespace chromecast { | 17 namespace chromecast { |
18 namespace shell { | 18 namespace shell { |
| 19 class CastRenderProcessObserver; |
19 | 20 |
20 class CastContentRendererClient : public content::ContentRendererClient { | 21 class CastContentRendererClient : public content::ContentRendererClient { |
21 public: | 22 public: |
22 CastContentRendererClient(); | 23 CastContentRendererClient(); |
23 ~CastContentRendererClient() override; | 24 ~CastContentRendererClient() override; |
24 | 25 |
25 // ContentRendererClient implementation: | 26 // ContentRendererClient implementation: |
26 void RenderThreadStarted() override; | 27 void RenderThreadStarted() override; |
27 void RenderViewCreated(content::RenderView* render_view) override; | 28 void RenderViewCreated(content::RenderView* render_view) override; |
28 void AddKeySystems( | 29 void AddKeySystems( |
29 std::vector< ::media::KeySystemInfo>* key_systems) override; | 30 std::vector< ::media::KeySystemInfo>* key_systems) override; |
30 #if !defined(OS_ANDROID) | 31 #if !defined(OS_ANDROID) |
31 scoped_ptr<media::RendererFactory> CreateMediaRendererFactory( | 32 scoped_ptr<media::RendererFactory> CreateMediaRendererFactory( |
32 content::RenderFrame* render_frame) override; | 33 content::RenderFrame* render_frame) override; |
33 #endif | 34 #endif |
34 blink::WebPrescientNetworking* GetPrescientNetworking() override; | 35 blink::WebPrescientNetworking* GetPrescientNetworking() override; |
35 void DeferMediaLoad(content::RenderFrame* render_frame, | 36 void DeferMediaLoad(content::RenderFrame* render_frame, |
36 const base::Closure& closure) override; | 37 const base::Closure& closure) override; |
37 | 38 |
38 private: | 39 private: |
39 scoped_ptr<dns_prefetch::PrescientNetworkingDispatcher> | 40 scoped_ptr<dns_prefetch::PrescientNetworkingDispatcher> |
40 prescient_networking_dispatcher_; | 41 prescient_networking_dispatcher_; |
| 42 scoped_ptr<CastRenderProcessObserver> cast_observer_; |
41 | 43 |
42 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient); | 44 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient); |
43 }; | 45 }; |
44 | 46 |
45 } // namespace shell | 47 } // namespace shell |
46 } // namespace chromecast | 48 } // namespace chromecast |
47 | 49 |
48 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ | 50 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |