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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_
6 #define CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_
10 #include "base/macros.h"
11 #include "content/public/renderer/content_renderer_client.h"
13 namespace network_hints
{
14 class PrescientNetworkingDispatcher
;
15 } // namespace network_hints
17 namespace chromecast
{
19 class CastRenderProcessObserver
;
21 class CastContentRendererClient
: public content::ContentRendererClient
{
23 CastContentRendererClient();
24 ~CastContentRendererClient() override
;
26 // ContentRendererClient implementation:
27 void RenderThreadStarted() override
;
28 void RenderViewCreated(content::RenderView
* render_view
) override
;
30 std::vector
< ::media::KeySystemInfo
>* key_systems
) override
;
31 #if !defined(OS_ANDROID)
32 scoped_ptr
<media::RendererFactory
> CreateMediaRendererFactory(
33 content::RenderFrame
* render_frame
) override
;
35 blink::WebPrescientNetworking
* GetPrescientNetworking() override
;
36 void DeferMediaLoad(content::RenderFrame
* render_frame
,
37 const base::Closure
& closure
) override
;
40 scoped_ptr
<network_hints::PrescientNetworkingDispatcher
>
41 prescient_networking_dispatcher_
;
42 scoped_ptr
<CastRenderProcessObserver
> cast_observer_
;
44 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient
);
48 } // namespace chromecast
50 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_