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

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

Issue 794253004: Chromecast: wires up renderer-side CMA message filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (Derek's media deferer CL just landed) Created 5 years, 12 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 #include "chromecast/renderer/cast_content_renderer_client.h" 5 #include "chromecast/renderer/cast_content_renderer_client.h"
6 6
7 #include <sys/sysinfo.h> 7 #include <sys/sysinfo.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/memory_pressure_listener.h" 10 #include "base/memory/memory_pressure_listener.h"
11 #include "chromecast/common/chromecast_switches.h" 11 #include "chromecast/common/chromecast_switches.h"
12 #include "chromecast/renderer/cast_media_load_deferrer.h" 12 #include "chromecast/renderer/cast_media_load_deferrer.h"
13 #include "chromecast/renderer/cast_render_process_observer.h"
13 #include "chromecast/renderer/key_systems_cast.h" 14 #include "chromecast/renderer/key_systems_cast.h"
14 #include "chromecast/renderer/media/cma_media_renderer_factory.h" 15 #include "chromecast/renderer/media/cma_media_renderer_factory.h"
15 #include "components/dns_prefetch/renderer/prescient_networking_dispatcher.h" 16 #include "components/dns_prefetch/renderer/prescient_networking_dispatcher.h"
16 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
17 #include "content/public/renderer/render_frame.h" 18 #include "content/public/renderer/render_frame.h"
18 #include "content/public/renderer/render_view.h" 19 #include "content/public/renderer/render_view.h"
19 #include "crypto/nss_util.h" 20 #include "crypto/nss_util.h"
20 #include "third_party/WebKit/public/platform/WebColor.h" 21 #include "third_party/WebKit/public/platform/WebColor.h"
21 #include "third_party/WebKit/public/web/WebSettings.h" 22 #include "third_party/WebKit/public/web/WebSettings.h"
22 #include "third_party/WebKit/public/web/WebView.h" 23 #include "third_party/WebKit/public/web/WebView.h"
(...skipping 20 matching lines...) Expand all
43 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652. 44 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652.
44 // 45 //
45 // On platforms where the system NSS shared libraries are used, 46 // On platforms where the system NSS shared libraries are used,
46 // initialize NSS now because it won't be able to load the .so's 47 // initialize NSS now because it won't be able to load the .so's
47 // after entering the sandbox. 48 // after entering the sandbox.
48 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 49 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
49 if (!command_line->HasSwitch(switches::kSingleProcess)) 50 if (!command_line->HasSwitch(switches::kSingleProcess))
50 crypto::InitNSSSafely(); 51 crypto::InitNSSSafely();
51 #endif 52 #endif
52 53
54 cast_observer_.reset(new CastRenderProcessObserver());
55
53 prescient_networking_dispatcher_.reset( 56 prescient_networking_dispatcher_.reset(
54 new dns_prefetch::PrescientNetworkingDispatcher()); 57 new dns_prefetch::PrescientNetworkingDispatcher());
55 } 58 }
56 59
57 void CastContentRendererClient::RenderViewCreated( 60 void CastContentRendererClient::RenderViewCreated(
58 content::RenderView* render_view) { 61 content::RenderView* render_view) {
59 blink::WebView* webview = render_view->GetWebView(); 62 blink::WebView* webview = render_view->GetWebView();
60 if (webview) { 63 if (webview) {
61 webview->setBaseBackgroundColor(kColorBlack); 64 webview->setBaseBackgroundColor(kColorBlack);
62 65
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 closure.Run(); 102 closure.Run();
100 return; 103 return;
101 } 104 }
102 105
103 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. 106 // Lifetime is tied to |render_frame| via content::RenderFrameObserver.
104 new CastMediaLoadDeferrer(render_frame, closure); 107 new CastMediaLoadDeferrer(render_frame, closure);
105 } 108 }
106 109
107 } // namespace shell 110 } // namespace shell
108 } // namespace chromecast 111 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/renderer/cast_content_renderer_client.h ('k') | chromecast/renderer/cast_render_process_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698