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

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

Issue 1327723002: [Chromecast] Raises CastService creation to CastContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 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
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/location.h" 10 #include "base/location.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 CastContentRendererClient::CastContentRendererClient() { 100 CastContentRendererClient::CastContentRendererClient() {
101 } 101 }
102 102
103 CastContentRendererClient::~CastContentRendererClient() { 103 CastContentRendererClient::~CastContentRendererClient() {
104 } 104 }
105 105
106 void CastContentRendererClient::AddRendererNativeBindings( 106 void CastContentRendererClient::AddRendererNativeBindings(
107 blink::WebLocalFrame* frame) { 107 blink::WebLocalFrame* frame) {
108 } 108 }
109 109
110 std::vector<scoped_refptr<IPC::MessageFilter>>
111 CastContentRendererClient::GetRendererMessageFilters() {
112 return std::vector<scoped_refptr<IPC::MessageFilter>>();
113 }
byungchul 2015/09/01 23:18:01 remove unused header files.
gunsch 2015/09/01 23:42:49 Done.
114
115 void CastContentRendererClient::RenderThreadStarted() { 110 void CastContentRendererClient::RenderThreadStarted() {
116 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 111 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
117 #if !defined(USE_OPENSSL) 112 #if !defined(USE_OPENSSL)
118 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652. 113 // Note: Copied from chrome_render_process_observer.cc to fix b/8676652.
119 // 114 //
120 // On platforms where the system NSS shared libraries are used, 115 // On platforms where the system NSS shared libraries are used,
121 // initialize NSS now because it won't be able to load the .so's 116 // initialize NSS now because it won't be able to load the .so's
122 // after entering the sandbox. 117 // after entering the sandbox.
123 if (!command_line->HasSwitch(switches::kSingleProcess)) 118 if (!command_line->HasSwitch(switches::kSingleProcess))
124 crypto::InitNSSSafely(); 119 crypto::InitNSSSafely();
125 #endif 120 #endif
126 121
127 #if defined(ARCH_CPU_ARM_FAMILY) && !defined(OS_ANDROID) 122 #if defined(ARCH_CPU_ARM_FAMILY) && !defined(OS_ANDROID)
128 PlatformPollFreemem(); 123 PlatformPollFreemem();
129 #endif 124 #endif
130 125
131 // Set the initial known codecs mask. 126 // Set the initial known codecs mask.
132 if (command_line->HasSwitch(switches::kHdmiSinkSupportedCodecs)) { 127 if (command_line->HasSwitch(switches::kHdmiSinkSupportedCodecs)) {
133 int hdmi_codecs_mask; 128 int hdmi_codecs_mask;
134 if (base::StringToInt(command_line->GetSwitchValueASCII( 129 if (base::StringToInt(command_line->GetSwitchValueASCII(
135 switches::kHdmiSinkSupportedCodecs), 130 switches::kHdmiSinkSupportedCodecs),
136 &hdmi_codecs_mask)) { 131 &hdmi_codecs_mask)) {
137 ::media::SetHdmiSinkCodecs(hdmi_codecs_mask); 132 ::media::SetHdmiSinkCodecs(hdmi_codecs_mask);
138 } 133 }
139 } 134 }
140 135
141 cast_observer_.reset( 136 cast_observer_.reset(new CastRenderProcessObserver());
142 new CastRenderProcessObserver(GetRendererMessageFilters()));
143 137
144 prescient_networking_dispatcher_.reset( 138 prescient_networking_dispatcher_.reset(
145 new network_hints::PrescientNetworkingDispatcher()); 139 new network_hints::PrescientNetworkingDispatcher());
146 140
147 std::string last_launched_app = 141 std::string last_launched_app =
148 command_line->GetSwitchValueNative(switches::kLastLaunchedApp); 142 command_line->GetSwitchValueNative(switches::kLastLaunchedApp);
149 if (!last_launched_app.empty()) 143 if (!last_launched_app.empty())
150 base::debug::SetCrashKeyValue(crash_keys::kLastApp, last_launched_app); 144 base::debug::SetCrashKeyValue(crash_keys::kLastApp, last_launched_app);
151 145
152 std::string previous_app = 146 std::string previous_app =
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 closure.Run(); 210 closure.Run();
217 return; 211 return;
218 } 212 }
219 213
220 // Lifetime is tied to |render_frame| via content::RenderFrameObserver. 214 // Lifetime is tied to |render_frame| via content::RenderFrameObserver.
221 new CastMediaLoadDeferrer(render_frame, closure); 215 new CastMediaLoadDeferrer(render_frame, closure);
222 } 216 }
223 217
224 } // namespace shell 218 } // namespace shell
225 } // namespace chromecast 219 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698