Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: chromecast/renderer/cast_content_renderer_client.h

Issue 1171303002: Chromecast: move link-time decisions to inheritance-based Content*Client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 IPC { 13 namespace IPC {
14 class MessageFilter; 14 class MessageFilter;
15 } 15 }
16 16
17 namespace network_hints { 17 namespace network_hints {
18 class PrescientNetworkingDispatcher; 18 class PrescientNetworkingDispatcher;
19 } // namespace network_hints 19 } // namespace network_hints
20 20
21 namespace chromecast { 21 namespace chromecast {
22 namespace shell { 22 namespace shell {
23 class CastRenderProcessObserver; 23 class CastRenderProcessObserver;
24 24
25 // Adds any platform-specific bindings to the current frame.
26 void PlatformAddRendererNativeBindings(blink::WebLocalFrame* frame);
27
28 class CastContentRendererClient : public content::ContentRendererClient { 25 class CastContentRendererClient : public content::ContentRendererClient {
29 public: 26 public:
30 // Creates an implementation of CastContentRendererClient. Platform should 27 // Creates an implementation of CastContentRendererClient. Platform should
31 // link in an implementation as needed. 28 // link in an implementation as needed.
32 static scoped_ptr<CastContentRendererClient> Create(); 29 static scoped_ptr<CastContentRendererClient> Create();
33 30
34 ~CastContentRendererClient() override; 31 ~CastContentRendererClient() override;
35 32
33 // Adds any platform-specific bindings to the current frame.
34 virtual void AddRendererNativeBindings(blink::WebLocalFrame* frame);
35
36 // Returns any MessageFilters from the platform implementation that should 36 // Returns any MessageFilters from the platform implementation that should
37 // be added to the render process. 37 // be added to the render process.
38 std::vector<scoped_refptr<IPC::MessageFilter>> 38 virtual std::vector<scoped_refptr<IPC::MessageFilter>>
39 PlatformGetRendererMessageFilters(); 39 GetRendererMessageFilters();
40 40
41 // ContentRendererClient implementation: 41 // ContentRendererClient implementation:
42 void RenderThreadStarted() override; 42 void RenderThreadStarted() override;
43 void RenderViewCreated(content::RenderView* render_view) override; 43 void RenderViewCreated(content::RenderView* render_view) override;
44 void AddKeySystems( 44 void AddKeySystems(
45 std::vector< ::media::KeySystemInfo>* key_systems) override; 45 std::vector< ::media::KeySystemInfo>* key_systems) override;
46 #if !defined(OS_ANDROID) 46 #if !defined(OS_ANDROID)
47 scoped_ptr<::media::RendererFactory> CreateMediaRendererFactory( 47 scoped_ptr<::media::RendererFactory> CreateMediaRendererFactory(
48 content::RenderFrame* render_frame, 48 content::RenderFrame* render_frame,
49 const scoped_refptr<::media::MediaLog>& media_log) override; 49 const scoped_refptr<::media::MediaLog>& media_log) override;
(...skipping 10 matching lines...) Expand all
60 prescient_networking_dispatcher_; 60 prescient_networking_dispatcher_;
61 scoped_ptr<CastRenderProcessObserver> cast_observer_; 61 scoped_ptr<CastRenderProcessObserver> cast_observer_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient); 63 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient);
64 }; 64 };
65 65
66 } // namespace shell 66 } // namespace shell
67 } // namespace chromecast 67 } // namespace chromecast
68 68
69 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ 69 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698