Make Ctrl + T from apps focus the new tab's omnibox on Linux and ChromeOS.
[chromium-blink-merge.git] / chromecast / renderer / cast_content_renderer_client.h
blobefdc3a5a9f68ee17042ad823c7259109467822e4
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_
8 #include <vector>
10 #include "base/macros.h"
11 #include "content/public/renderer/content_renderer_client.h"
13 namespace IPC {
14 class MessageFilter;
17 namespace network_hints {
18 class PrescientNetworkingDispatcher;
19 } // namespace network_hints
21 namespace chromecast {
22 namespace shell {
23 class CastRenderProcessObserver;
25 // Adds any platform-specific bindings to the current frame.
26 void PlatformAddRendererNativeBindings(blink::WebLocalFrame* frame);
28 class CastContentRendererClient : public content::ContentRendererClient {
29 public:
30 CastContentRendererClient();
31 ~CastContentRendererClient() override;
33 // Returns any MessageFilters from the platform implementation that should
34 // be added to the render process.
35 std::vector<scoped_refptr<IPC::MessageFilter>>
36 PlatformGetRendererMessageFilters();
38 // ContentRendererClient implementation:
39 void RenderThreadStarted() override;
40 void RenderViewCreated(content::RenderView* render_view) override;
41 void AddKeySystems(
42 std::vector< ::media::KeySystemInfo>* key_systems) override;
43 #if !defined(OS_ANDROID)
44 scoped_ptr<media::RendererFactory> CreateMediaRendererFactory(
45 content::RenderFrame* render_frame,
46 const scoped_refptr<media::MediaLog>& media_log) override;
47 #endif
48 blink::WebPrescientNetworking* GetPrescientNetworking() override;
49 void DeferMediaLoad(content::RenderFrame* render_frame,
50 const base::Closure& closure) override;
52 private:
53 scoped_ptr<network_hints::PrescientNetworkingDispatcher>
54 prescient_networking_dispatcher_;
55 scoped_ptr<CastRenderProcessObserver> cast_observer_;
57 DISALLOW_COPY_AND_ASSIGN(CastContentRendererClient);
60 } // namespace shell
61 } // namespace chromecast
63 #endif // CHROMECAST_RENDERER_CAST_CONTENT_RENDERER_CLIENT_H_