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

Side by Side Diff: content/browser/geolocation/mock_location_provider.cc

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
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 // This file implements a mock location provider and the factory functions for 5 // This file implements a mock location provider and the factory functions for
6 // various ways of creating it. 6 // various ways of creating it.
7 7
8 #include "device/geolocation/mock_location_provider.h" 8 #include "content/browser/geolocation/mock_location_provider.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
17 17
18 namespace device { 18 namespace content {
19 19
20 MockLocationProvider::MockLocationProvider() 20 MockLocationProvider::MockLocationProvider()
21 : state_(STOPPED), 21 : state_(STOPPED),
22 is_permission_granted_(false), 22 is_permission_granted_(false),
23 provider_task_runner_(base::ThreadTaskRunnerHandle::Get()) {} 23 provider_task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
24 24
25 MockLocationProvider::~MockLocationProvider() {} 25 MockLocationProvider::~MockLocationProvider() {}
26 26
27 void MockLocationProvider::HandlePositionChanged(const Geoposition& position) { 27 void MockLocationProvider::HandlePositionChanged(const Geoposition& position) {
28 if (provider_task_runner_->BelongsToCurrentThread()) { 28 if (provider_task_runner_->BelongsToCurrentThread()) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 LocationProvider* NewAutoFailMockLocationProvider() { 116 LocationProvider* NewAutoFailMockLocationProvider() {
117 return new AutoMockLocationProvider(false, false); 117 return new AutoMockLocationProvider(false, false);
118 } 118 }
119 119
120 LocationProvider* NewAutoSuccessMockNetworkLocationProvider() { 120 LocationProvider* NewAutoSuccessMockNetworkLocationProvider() {
121 return new AutoMockLocationProvider(true, true); 121 return new AutoMockLocationProvider(true, true);
122 } 122 }
123 123
124 } // namespace device 124 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/mock_location_provider.h ('k') | content/browser/geolocation/network_location_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698