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

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

Issue 2342563003: [chromecast] Enable Mojo javascript bindings for cast_shell (Closed)
Patch Set: Add Mojo JavaScript support for Chromecast Created 4 years, 3 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
« no previous file with comments | « chromecast/renderer/DEPS ('k') | chromecast/renderer/cast_content_renderer_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "build/build_config.h" 11 #include "build/build_config.h"
12 #include "content/public/renderer/content_renderer_client.h" 12 #include "content/public/renderer/content_renderer_client.h"
13 13
14 namespace IPC { 14 namespace IPC {
15 class MessageFilter; 15 class MessageFilter;
16 } 16 }
17 17
18 namespace network_hints { 18 namespace network_hints {
19 class PrescientNetworkingDispatcher; 19 class PrescientNetworkingDispatcher;
20 } // namespace network_hints 20 } // namespace network_hints
21 21
22 namespace chromecast { 22 namespace chromecast {
23 namespace media { 23 namespace media {
24 class MediaCapsObserverImpl; 24 class MediaCapsObserverImpl;
25 } 25 }
26 26
27 namespace shell { 27 namespace shell {
28 class CastGinRunner;
29 class CastRenderThreadObserver;
30
31 void ExecuteJavaScript(content::RenderFrame* render_frame, int resourceId);
28 32
29 class CastContentRendererClient : public content::ContentRendererClient { 33 class CastContentRendererClient : public content::ContentRendererClient {
30 public: 34 public:
31 // Creates an implementation of CastContentRendererClient. Platform should 35 // Creates an implementation of CastContentRendererClient. Platform should
32 // link in an implementation as needed. 36 // link in an implementation as needed.
33 static std::unique_ptr<CastContentRendererClient> Create(); 37 static std::unique_ptr<CastContentRendererClient> Create();
34 38
35 ~CastContentRendererClient() override; 39 ~CastContentRendererClient() override;
36 40
37 // ContentRendererClient implementation: 41 // ContentRendererClient implementation:
38 void RenderThreadStarted() override; 42 void RenderThreadStarted() override;
39 void RenderViewCreated(content::RenderView* render_view) override; 43 void RenderViewCreated(content::RenderView* render_view) override;
40 void AddSupportedKeySystems( 44 void AddSupportedKeySystems(
41 std::vector<std::unique_ptr<::media::KeySystemProperties>>* 45 std::vector<std::unique_ptr<::media::KeySystemProperties>>*
42 key_systems_properties) override; 46 key_systems_properties) override;
43 blink::WebPrescientNetworking* GetPrescientNetworking() override; 47 blink::WebPrescientNetworking* GetPrescientNetworking() override;
44 void DeferMediaLoad(content::RenderFrame* render_frame, 48 void DeferMediaLoad(content::RenderFrame* render_frame,
45 bool render_frame_has_played_media_before, 49 bool render_frame_has_played_media_before,
46 const base::Closure& closure) override; 50 const base::Closure& closure) override;
51 void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override;
47 52
48 protected: 53 protected:
49 CastContentRendererClient(); 54 CastContentRendererClient();
50 55
51 private: 56 private:
52 std::unique_ptr<network_hints::PrescientNetworkingDispatcher> 57 std::unique_ptr<network_hints::PrescientNetworkingDispatcher>
53 prescient_networking_dispatcher_; 58 prescient_networking_dispatcher_;
54 std::unique_ptr<media::MediaCapsObserverImpl> media_caps_observer_; 59 std::unique_ptr<media::MediaCapsObserverImpl> media_caps_observer_;
55 const bool allow_hidden_media_playback_; 60 const bool allow_hidden_media_playback_;
56 61
57 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient); 62 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient);
58 }; 63 };
59 64
60 } // namespace shell 65 } // namespace shell
61 } // namespace chromecast 66 } // namespace chromecast
62 67
63 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_ 68 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/DEPS ('k') | chromecast/renderer/cast_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698