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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 using blink::WebString; | 167 using blink::WebString; |
168 using blink::WebURL; | 168 using blink::WebURL; |
169 using blink::WebVector; | 169 using blink::WebVector; |
170 | 170 |
171 namespace content { | 171 namespace content { |
172 | 172 |
173 namespace { | 173 namespace { |
174 | 174 |
175 bool g_sandbox_enabled = true; | 175 bool g_sandbox_enabled = true; |
176 double g_test_device_light_data = -1; | 176 double g_test_device_light_data = -1; |
177 base::LazyInstance<blink::WebDeviceMotionData>::Leaky | 177 base::LazyInstance<device::MotionData>::Leaky g_test_device_motion_data = |
178 g_test_device_motion_data = LAZY_INSTANCE_INITIALIZER; | 178 LAZY_INSTANCE_INITIALIZER; |
179 base::LazyInstance<blink::WebDeviceOrientationData>::Leaky | 179 base::LazyInstance<device::OrientationData>::Leaky |
180 g_test_device_orientation_data = LAZY_INSTANCE_INITIALIZER; | 180 g_test_device_orientation_data = LAZY_INSTANCE_INITIALIZER; |
181 | 181 |
182 media::AudioParameters GetAudioHardwareParams() { | 182 media::AudioParameters GetAudioHardwareParams() { |
183 blink::WebLocalFrame* const web_frame = | 183 blink::WebLocalFrame* const web_frame = |
184 blink::WebLocalFrame::frameForCurrentContext(); | 184 blink::WebLocalFrame::frameForCurrentContext(); |
185 RenderFrame* const render_frame = RenderFrame::FromWebFrame(web_frame); | 185 RenderFrame* const render_frame = RenderFrame::FromWebFrame(web_frame); |
186 return AudioDeviceFactory::GetOutputDeviceInfo(render_frame->GetRoutingID(), | 186 return AudioDeviceFactory::GetOutputDeviceInfo(render_frame->GetRoutingID(), |
187 0, std::string(), | 187 0, std::string(), |
188 web_frame->getSecurityOrigin()) | 188 web_frame->getSecurityOrigin()) |
189 .output_params(); | 189 .output_params(); |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1166 |
1167 // static | 1167 // static |
1168 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { | 1168 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { |
1169 g_test_device_light_data = data; | 1169 g_test_device_light_data = data; |
1170 } | 1170 } |
1171 | 1171 |
1172 //------------------------------------------------------------------------------ | 1172 //------------------------------------------------------------------------------ |
1173 | 1173 |
1174 // static | 1174 // static |
1175 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( | 1175 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( |
1176 const blink::WebDeviceMotionData& data) { | 1176 const device::MotionData& data) { |
1177 g_test_device_motion_data.Get() = data; | 1177 g_test_device_motion_data.Get() = data; |
1178 } | 1178 } |
1179 | 1179 |
1180 //------------------------------------------------------------------------------ | 1180 //------------------------------------------------------------------------------ |
1181 | 1181 |
1182 // static | 1182 // static |
1183 void RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting( | 1183 void RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting( |
1184 const blink::WebDeviceOrientationData& data) { | 1184 const device::OrientationData& data) { |
1185 g_test_device_orientation_data.Get() = data; | 1185 g_test_device_orientation_data.Get() = data; |
1186 } | 1186 } |
1187 | 1187 |
1188 //------------------------------------------------------------------------------ | 1188 //------------------------------------------------------------------------------ |
1189 | 1189 |
1190 // static | 1190 // static |
1191 PlatformEventObserverBase* | 1191 PlatformEventObserverBase* |
1192 RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType( | 1192 RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType( |
1193 blink::WebPlatformEventType type) { | 1193 blink::WebPlatformEventType type) { |
1194 RenderThread* thread = RenderThreadImpl::current(); | 1194 RenderThread* thread = RenderThreadImpl::current(); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 return &trial_token_validator_; | 1325 return &trial_token_validator_; |
1326 } | 1326 } |
1327 | 1327 |
1328 void RendererBlinkPlatformImpl::workerContextCreated( | 1328 void RendererBlinkPlatformImpl::workerContextCreated( |
1329 const v8::Local<v8::Context>& worker) { | 1329 const v8::Local<v8::Context>& worker) { |
1330 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1330 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
1331 worker); | 1331 worker); |
1332 } | 1332 } |
1333 | 1333 |
1334 } // namespace content | 1334 } // namespace content |
OLD | NEW |