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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Revert licenses change for similarity Created 4 years, 2 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 (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
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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1193
1194 // static 1194 // static
1195 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { 1195 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) {
1196 g_test_device_light_data = data; 1196 g_test_device_light_data = data;
1197 } 1197 }
1198 1198
1199 //------------------------------------------------------------------------------ 1199 //------------------------------------------------------------------------------
1200 1200
1201 // static 1201 // static
1202 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( 1202 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(
1203 const blink::WebDeviceMotionData& data) { 1203 const device::MotionData& data) {
1204 g_test_device_motion_data.Get() = data; 1204 g_test_device_motion_data.Get() = data;
1205 } 1205 }
1206 1206
1207 //------------------------------------------------------------------------------ 1207 //------------------------------------------------------------------------------
1208 1208
1209 // static 1209 // static
1210 void RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting( 1210 void RendererBlinkPlatformImpl::SetMockDeviceOrientationDataForTesting(
1211 const blink::WebDeviceOrientationData& data) { 1211 const device::OrientationData& data) {
1212 g_test_device_orientation_data.Get() = data; 1212 g_test_device_orientation_data.Get() = data;
1213 } 1213 }
1214 1214
1215 //------------------------------------------------------------------------------ 1215 //------------------------------------------------------------------------------
1216 1216
1217 // static 1217 // static
1218 PlatformEventObserverBase* 1218 PlatformEventObserverBase*
1219 RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType( 1219 RendererBlinkPlatformImpl::CreatePlatformEventObserverFromType(
1220 blink::WebPlatformEventType type) { 1220 blink::WebPlatformEventType type) {
1221 RenderThread* thread = RenderThreadImpl::current(); 1221 RenderThread* thread = RenderThreadImpl::current();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 return &trial_token_validator_; 1352 return &trial_token_validator_;
1353 } 1353 }
1354 1354
1355 void RendererBlinkPlatformImpl::workerContextCreated( 1355 void RendererBlinkPlatformImpl::workerContextCreated(
1356 const v8::Local<v8::Context>& worker) { 1356 const v8::Local<v8::Context>& worker) {
1357 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( 1357 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
1358 worker); 1358 worker);
1359 } 1359 }
1360 1360
1361 } // namespace content 1361 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698