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

Side by Side Diff: content/browser/geolocation/geolocation_provider_impl.h

Issue 2104193002: Geolocation: Extract GeolocationProvider::Delegate into GeolocationDelegate (no new code) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jam@ nit: content/browser/geolocation/geolocation_delegate.cc --> content/public/browser Created 4 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 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/browser/geolocation_provider.h" 17 #include "content/public/browser/geolocation_provider.h"
18 #include "content/public/common/geoposition.h" 18 #include "content/public/common/geoposition.h"
19 19
20 namespace base { 20 namespace base {
21 template<typename Type> struct DefaultSingletonTraits; 21 template<typename Type> struct DefaultSingletonTraits;
22 } 22 }
23 23
24 namespace content { 24 namespace content {
25 class GeolocationDelegate;
25 class LocationArbitrator; 26 class LocationArbitrator;
26 27
27 class CONTENT_EXPORT GeolocationProviderImpl 28 class CONTENT_EXPORT GeolocationProviderImpl
28 : public NON_EXPORTED_BASE(GeolocationProvider), 29 : public NON_EXPORTED_BASE(GeolocationProvider),
29 public base::Thread { 30 public base::Thread {
30 public: 31 public:
31 // GeolocationProvider implementation: 32 // GeolocationProvider implementation:
32 std::unique_ptr<GeolocationProvider::Subscription> AddLocationUpdateCallback( 33 std::unique_ptr<GeolocationProvider::Subscription> AddLocationUpdateCallback(
33 const LocationUpdateCallback& callback, 34 const LocationUpdateCallback& callback,
34 bool enable_high_accuracy) override; 35 bool enable_high_accuracy) override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 base::CallbackList<void(const Geoposition&)> high_accuracy_callbacks_; 86 base::CallbackList<void(const Geoposition&)> high_accuracy_callbacks_;
86 base::CallbackList<void(const Geoposition&)> low_accuracy_callbacks_; 87 base::CallbackList<void(const Geoposition&)> low_accuracy_callbacks_;
87 88
88 bool user_did_opt_into_location_services_; 89 bool user_did_opt_into_location_services_;
89 Geoposition position_; 90 Geoposition position_;
90 91
91 // True only in testing, where we want to use a custom position. 92 // True only in testing, where we want to use a custom position.
92 bool ignore_location_updates_; 93 bool ignore_location_updates_;
93 94
94 // The system provided Delegate for the |arbitrator_|. 95 // The system provided Delegate for the |arbitrator_|.
95 std::unique_ptr<GeolocationProvider::Delegate> delegate_; 96 std::unique_ptr<GeolocationDelegate> delegate_;
96 97
97 // Only to be used on the geolocation thread. 98 // Only to be used on the geolocation thread.
98 std::unique_ptr<LocationArbitrator> arbitrator_; 99 std::unique_ptr<LocationArbitrator> arbitrator_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); 101 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl);
101 }; 102 };
102 103
103 } // namespace content 104 } // namespace content
104 105
105 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ 106 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | content/browser/geolocation/geolocation_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698