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

Side by Side Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/MockLocationProvider.java

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 4 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/public/test/android/BUILD.gn ('k') | content/public/test/content_test_suite_base.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 package org.chromium.device.geolocation; 5 package org.chromium.content.browser.test.util;
6 6
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.os.HandlerThread; 8 import android.os.HandlerThread;
9 import android.os.Message; 9 import android.os.Message;
10 10
11 import org.chromium.content.browser.LocationProviderAdapter;
12 import org.chromium.content.browser.LocationProviderFactory;
13
11 /** 14 /**
12 * A mock location provider. When started, runs a background thread that periodi cally 15 * A mock location provider. When started, runs a background thread that periodi cally
13 * posts location updates. This does not involve any system Location APIs and th us 16 * posts location updates. This does not involve any system Location APIs and th us
14 * does not require any special permissions in the test app or on the device. 17 * does not require any special permissions in the test app or on the device.
15 */ 18 */
16 public class MockLocationProvider implements LocationProviderFactory.LocationPro vider { 19 public class MockLocationProvider implements LocationProviderFactory.LocationPro vider {
17 private boolean mIsRunning; 20 private boolean mIsRunning;
18 private Handler mHandler; 21 private Handler mHandler;
19 private HandlerThread mHandlerThread; 22 private HandlerThread mHandlerThread;
20 private final Object mLock = new Object(); 23 private final Object mLock = new Object();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 private void newLocation() { 83 private void newLocation() {
81 LocationProviderAdapter.newLocationAvailable( 84 LocationProviderAdapter.newLocationAvailable(
82 0, 0, System.currentTimeMillis() / 1000.0, 85 0, 0, System.currentTimeMillis() / 1000.0,
83 false, 0, 86 false, 0,
84 true, 0.5, 87 true, 0.5,
85 false, 0, 88 false, 0,
86 false, 0); 89 false, 0);
87 } 90 }
88 }; 91 };
89 92
OLDNEW
« no previous file with comments | « content/public/test/android/BUILD.gn ('k') | content/public/test/content_test_suite_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698