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

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

Issue 8997008: Move AccessTokenStore to Content API, now that it is a pure-virtual class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head (pure merge). Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A location provider provides position information from a particular source 5 // A location provider provides position information from a particular source
6 // (GPS, network etc). 6 // (GPS, network etc).
7 // 7 //
8 // This file declares a base class to be used by all location providers. 8 // This file declares a base class to be used by all location providers.
9 // Primarily, this class declares interface methods to be implemented by 9 // Primarily, this class declares interface methods to be implemented by
10 // derived classes. 10 // derived classes.
11 11
12 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_ 12 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_
13 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_ 13 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_
14 #pragma once 14 #pragma once
15 15
16 #include <map> 16 #include <map>
17 17
18 #include "base/string16.h" 18 #include "base/string16.h"
19 #include "base/threading/non_thread_safe.h" 19 #include "base/threading/non_thread_safe.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 21
22 class AccessTokenStore;
23 struct Geoposition; 22 struct Geoposition;
24 class GURL; 23 class GURL;
25 24
25 namespace content {
26 class AccessTokenStore;
27 }
28
26 namespace net { 29 namespace net {
27 class URLRequestContextGetter; 30 class URLRequestContextGetter;
28 } 31 }
29 32
30 // The base class used by all location providers. 33 // The base class used by all location providers.
31 class CONTENT_EXPORT LocationProviderBase 34 class CONTENT_EXPORT LocationProviderBase
32 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 35 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
33 public: 36 public:
34 // Clients of the location provider must implement this interface. All call- 37 // Clients of the location provider must implement this interface. All call-
35 // backs to this interface will happen in the context of the thread on which 38 // backs to this interface will happen in the context of the thread on which
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 private: 89 private:
87 // The listeners registered to this provider. For each listener, we store a 90 // The listeners registered to this provider. For each listener, we store a
88 // ref count. 91 // ref count.
89 typedef std::map<ListenerInterface*, int> ListenerMap; 92 typedef std::map<ListenerInterface*, int> ListenerMap;
90 ListenerMap listeners_; 93 ListenerMap listeners_;
91 }; 94 };
92 95
93 // Factory functions for the various types of location provider to abstract 96 // Factory functions for the various types of location provider to abstract
94 // over the platform-dependent implementations. 97 // over the platform-dependent implementations.
95 CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider( 98 CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider(
96 AccessTokenStore* access_token_store, 99 content::AccessTokenStore* access_token_store,
97 net::URLRequestContextGetter* context, 100 net::URLRequestContextGetter* context,
98 const GURL& url, 101 const GURL& url,
99 const string16& access_token); 102 const string16& access_token);
100 LocationProviderBase* NewSystemLocationProvider(); 103 LocationProviderBase* NewSystemLocationProvider();
101 104
102 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_ 105 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/browser/geolocation/location_arbitrator_unittest.cc ('k') | content/browser/geolocation/network_location_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698