| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 double g_test_device_light_data = -1; | 173 double g_test_device_light_data = -1; |
| 174 base::LazyInstance<blink::WebDeviceMotionData>::Leaky | 174 base::LazyInstance<blink::WebDeviceMotionData>::Leaky |
| 175 g_test_device_motion_data = LAZY_INSTANCE_INITIALIZER; | 175 g_test_device_motion_data = LAZY_INSTANCE_INITIALIZER; |
| 176 base::LazyInstance<blink::WebDeviceOrientationData>::Leaky | 176 base::LazyInstance<blink::WebDeviceOrientationData>::Leaky |
| 177 g_test_device_orientation_data = LAZY_INSTANCE_INITIALIZER; | 177 g_test_device_orientation_data = LAZY_INSTANCE_INITIALIZER; |
| 178 | 178 |
| 179 media::AudioParameters GetAudioHardwareParams() { | 179 media::AudioParameters GetAudioHardwareParams() { |
| 180 blink::WebLocalFrame* const web_frame = | 180 blink::WebLocalFrame* const web_frame = |
| 181 blink::WebLocalFrame::frameForCurrentContext(); | 181 blink::WebLocalFrame::frameForCurrentContext(); |
| 182 RenderFrame* const render_frame = RenderFrame::FromWebFrame(web_frame); | 182 RenderFrame* const render_frame = RenderFrame::FromWebFrame(web_frame); |
| 183 if (!render_frame) |
| 184 return media::AudioParameters::UnavailableDeviceParams(); |
| 185 |
| 183 return AudioDeviceFactory::GetOutputDeviceInfo(render_frame->GetRoutingID(), | 186 return AudioDeviceFactory::GetOutputDeviceInfo(render_frame->GetRoutingID(), |
| 184 0, std::string(), | 187 0, std::string(), |
| 185 web_frame->getSecurityOrigin()) | 188 web_frame->getSecurityOrigin()) |
| 186 .output_params(); | 189 .output_params(); |
| 187 } | 190 } |
| 188 | 191 |
| 189 } // namespace | 192 } // namespace |
| 190 | 193 |
| 191 //------------------------------------------------------------------------------ | 194 //------------------------------------------------------------------------------ |
| 192 | 195 |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 return &trial_token_validator_; | 1298 return &trial_token_validator_; |
| 1296 } | 1299 } |
| 1297 | 1300 |
| 1298 void RendererBlinkPlatformImpl::workerContextCreated( | 1301 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1299 const v8::Local<v8::Context>& worker) { | 1302 const v8::Local<v8::Context>& worker) { |
| 1300 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1303 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1301 worker); | 1304 worker); |
| 1302 } | 1305 } |
| 1303 | 1306 |
| 1304 } // namespace content | 1307 } // namespace content |
| OLD | NEW |