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

Side by Side Diff: webkit/support/test_webkit_platform_support.cc

Issue 5222955109842944: Add plumbing for platform based Device Motion testing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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 "webkit/support/test_webkit_platform_support.h" 5 #include "webkit/support/test_webkit_platform_support.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { 349 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) {
350 data = gamepad_data_; 350 data = gamepad_data_;
351 } 351 }
352 352
353 void TestWebKitPlatformSupport::setGamepadData( 353 void TestWebKitPlatformSupport::setGamepadData(
354 const WebKit::WebGamepads& data) { 354 const WebKit::WebGamepads& data) {
355 gamepad_data_ = data; 355 gamepad_data_ = data;
356 } 356 }
357 357
358 void TestWebKitPlatformSupport::setDeviceMotionData(
359 const WebKit::WebDeviceMotionData& data) {
360 device_motion_data_ = data;
jochen (gone - plz use gerrit) 2013/07/15 13:55:08 unless you intend to use this in webkit unit tests
timvolodine 2013/07/16 11:53:44 Done.
361 }
362
358 void TestWebKitPlatformSupport::GetPlugins( 363 void TestWebKitPlatformSupport::GetPlugins(
359 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { 364 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
360 if (refresh) 365 if (refresh)
361 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 366 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
362 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); 367 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
363 } 368 }
364 369
365 webkit_glue::ResourceLoaderBridge* 370 webkit_glue::ResourceLoaderBridge*
366 TestWebKitPlatformSupport::CreateResourceLoader( 371 TestWebKitPlatformSupport::CreateResourceLoader(
367 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 372 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 return view.release(); 452 return view.release();
448 } 453 }
449 454
450 WebKit::WebLayerTreeView* 455 WebKit::WebLayerTreeView*
451 TestWebKitPlatformSupport::createLayerTreeViewForTesting( 456 TestWebKitPlatformSupport::createLayerTreeViewForTesting(
452 TestViewType type) { 457 TestViewType type) {
453 DCHECK_EQ(TestViewTypeUnitTest, type); 458 DCHECK_EQ(TestViewTypeUnitTest, type);
454 return createLayerTreeViewForTesting(); 459 return createLayerTreeViewForTesting();
455 } 460 }
456 461
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698