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

Side by Side Diff: content/test/layouttest_support.cc

Issue 1972733002: Delete geofencing implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark histogram suffix as obsolete Created 4 years, 7 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
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "components/scheduler/test/renderer_scheduler_test_support.h" 14 #include "components/scheduler/test/renderer_scheduler_test_support.h"
15 #include "components/test_runner/test_common.h" 15 #include "components/test_runner/test_common.h"
16 #include "components/test_runner/web_frame_test_proxy.h" 16 #include "components/test_runner/web_frame_test_proxy.h"
17 #include "components/test_runner/web_test_proxy.h" 17 #include "components/test_runner/web_test_proxy.h"
18 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" 18 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h"
19 #include "content/browser/renderer_host/render_process_host_impl.h" 19 #include "content/browser/renderer_host/render_process_host_impl.h"
20 #include "content/browser/renderer_host/render_widget_host_impl.h" 20 #include "content/browser/renderer_host/render_widget_host_impl.h"
21 #include "content/child/geofencing/web_geofencing_provider_impl.h"
22 #include "content/common/site_isolation_policy.h" 21 #include "content/common/site_isolation_policy.h"
23 #include "content/public/common/page_state.h" 22 #include "content/public/common/page_state.h"
24 #include "content/public/renderer/renderer_gamepad_provider.h" 23 #include "content/public/renderer/renderer_gamepad_provider.h"
25 #include "content/renderer/fetchers/manifest_fetcher.h" 24 #include "content/renderer/fetchers/manifest_fetcher.h"
26 #include "content/renderer/history_entry.h" 25 #include "content/renderer/history_entry.h"
27 #include "content/renderer/history_serialization.h" 26 #include "content/renderer/history_serialization.h"
28 #include "content/renderer/render_frame_impl.h" 27 #include "content/renderer/render_frame_impl.h"
29 #include "content/renderer/render_thread_impl.h" 28 #include "content/renderer/render_thread_impl.h"
30 #include "content/renderer/render_view_impl.h" 29 #include "content/renderer/render_view_impl.h"
31 #include "content/renderer/renderer_blink_platform_impl.h" 30 #include "content/renderer/renderer_blink_platform_impl.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 static_cast<RenderProcessHostImpl*>( 359 static_cast<RenderProcessHostImpl*>(
361 RenderProcessHost::FromID(render_process_id)); 360 RenderProcessHost::FromID(render_process_id));
362 361
363 BluetoothDispatcherHost* dispatcher_host = 362 BluetoothDispatcherHost* dispatcher_host =
364 render_process_host_impl->GetBluetoothDispatcherHost(); 363 render_process_host_impl->GetBluetoothDispatcherHost();
365 364
366 if (dispatcher_host != NULL) 365 if (dispatcher_host != NULL)
367 dispatcher_host->SetBluetoothAdapterForTesting(std::move(adapter)); 366 dispatcher_host->SetBluetoothAdapterForTesting(std::move(adapter));
368 } 367 }
369 368
370 void SetGeofencingMockProvider(bool service_available) {
371 static_cast<WebGeofencingProviderImpl*>(
372 RenderThreadImpl::current()->blink_platform_impl()->geofencingProvider())
373 ->SetMockProvider(service_available);
374 }
375
376 void ClearGeofencingMockProvider() {
377 static_cast<WebGeofencingProviderImpl*>(
378 RenderThreadImpl::current()->blink_platform_impl()->geofencingProvider())
379 ->ClearMockProvider();
380 }
381
382 void SetGeofencingMockPosition(double latitude, double longitude) {
383 static_cast<WebGeofencingProviderImpl*>(
384 RenderThreadImpl::current()->blink_platform_impl()->geofencingProvider())
385 ->SetMockPosition(latitude, longitude);
386 }
387
388 void UseSynchronousResizeMode(RenderView* render_view, bool enable) { 369 void UseSynchronousResizeMode(RenderView* render_view, bool enable) {
389 static_cast<RenderViewImpl*>(render_view)-> 370 static_cast<RenderViewImpl*>(render_view)->
390 UseSynchronousResizeModeForTesting(enable); 371 UseSynchronousResizeModeForTesting(enable);
391 } 372 }
392 373
393 void EnableAutoResizeMode(RenderView* render_view, 374 void EnableAutoResizeMode(RenderView* render_view,
394 const WebSize& min_size, 375 const WebSize& min_size,
395 const WebSize& max_size) { 376 const WebSize& max_size) {
396 static_cast<RenderViewImpl*>(render_view)-> 377 static_cast<RenderViewImpl*>(render_view)->
397 EnableAutoResizeForTesting(min_size, max_size); 378 EnableAutoResizeForTesting(min_size, max_size);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return result; 440 return result;
460 } 441 }
461 442
462 void SchedulerRunIdleTasks(const base::Closure& callback) { 443 void SchedulerRunIdleTasks(const base::Closure& callback) {
463 scheduler::RendererScheduler* scheduler = 444 scheduler::RendererScheduler* scheduler =
464 content::RenderThreadImpl::current()->GetRendererScheduler(); 445 content::RenderThreadImpl::current()->GetRendererScheduler();
465 scheduler::RunIdleTasksForTesting(scheduler, callback); 446 scheduler::RunIdleTasksForTesting(scheduler, callback);
466 } 447 }
467 448
468 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698