OLD | NEW |
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/browser/geolocation/geolocation_provider_impl.h" | 5 #include "content/browser/geolocation/geolocation_provider_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "content/browser/geolocation/location_arbitrator_impl.h" | 14 #include "content/browser/geolocation/location_arbitrator_impl.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 namespace { | 19 namespace { |
20 void OverrideLocationForTestingOnIOThread( | 20 void OverrideLocationForTestingOnIOThread( |
21 const Geoposition& position, | 21 const Geoposition& position, |
22 const base::Closure& completion_callback, | 22 const base::Closure& completion_callback, |
23 scoped_refptr<base::MessageLoopProxy> callback_loop) { | 23 scoped_refptr<base::MessageLoopProxy> callback_loop) { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 arbitrator_ = NULL; | 227 arbitrator_ = NULL; |
228 } | 228 } |
229 | 229 |
230 GeolocationArbitrator* GeolocationProviderImpl::CreateArbitrator() { | 230 GeolocationArbitrator* GeolocationProviderImpl::CreateArbitrator() { |
231 GeolocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( | 231 GeolocationArbitratorImpl::LocationUpdateCallback callback = base::Bind( |
232 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); | 232 &GeolocationProviderImpl::OnLocationUpdate, base::Unretained(this)); |
233 return new GeolocationArbitratorImpl(callback); | 233 return new GeolocationArbitratorImpl(callback); |
234 } | 234 } |
235 | 235 |
236 } // namespace content | 236 } // namespace content |
OLD | NEW |