summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/geolocation')
-rw-r--r--content/browser/geolocation/arbitrator_dependency_factory.h5
-rw-r--r--content/browser/geolocation/device_data_provider.h12
-rw-r--r--content/browser/geolocation/geolocation_observer.h5
-rw-r--r--content/browser/geolocation/geolocation_provider.h7
-rw-r--r--content/browser/geolocation/location_arbitrator.h4
-rw-r--r--content/browser/geolocation/location_provider.h8
-rw-r--r--content/browser/geolocation/network_location_provider.h3
-rw-r--r--content/browser/geolocation/network_location_request.h3
-rw-r--r--content/browser/geolocation/wifi_data_provider_common.h3
-rw-r--r--content/browser/geolocation/wifi_data_provider_win.h5
-rw-r--r--content/browser/geolocation/win7_location_api_win.h3
-rw-r--r--content/browser/geolocation/win7_location_provider_win.h3
12 files changed, 38 insertions, 23 deletions
diff --git a/content/browser/geolocation/arbitrator_dependency_factory.h b/content/browser/geolocation/arbitrator_dependency_factory.h
index 7114b70..484c673 100644
--- a/content/browser/geolocation/arbitrator_dependency_factory.h
+++ b/content/browser/geolocation/arbitrator_dependency_factory.h
@@ -8,6 +8,7 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
+#include "content/common/content_export.h"
class AccessTokenStore;
class GURL;
@@ -23,7 +24,7 @@ class URLRequestContextGetter;
// Allows injection of factory methods for creating the location providers.
// RefCounted for simplicity of writing tests.
-class GeolocationArbitratorDependencyFactory
+class CONTENT_EXPORT GeolocationArbitratorDependencyFactory
: public base::RefCounted<GeolocationArbitratorDependencyFactory> {
public:
// Defines a function that returns the current time.
@@ -45,7 +46,7 @@ class GeolocationArbitratorDependencyFactory
// The default dependency factory, exposed so that it is possible
// to override only certain parts (e.g. the location providers).
-class DefaultGeolocationArbitratorDependencyFactory
+class CONTENT_EXPORT DefaultGeolocationArbitratorDependencyFactory
: public GeolocationArbitratorDependencyFactory {
public:
// GeolocationArbitratorDependencyFactory
diff --git a/content/browser/geolocation/device_data_provider.h b/content/browser/geolocation/device_data_provider.h
index e4e2eee..64e52ad 100644
--- a/content/browser/geolocation/device_data_provider.h
+++ b/content/browser/geolocation/device_data_provider.h
@@ -34,6 +34,7 @@
#include "base/string_util.h"
#include "base/task.h"
#include "base/threading/non_thread_safe.h"
+#include "content/common/content_export.h"
// The following data structures are used to store cell radio data and wifi
// data. See the Geolocation API design document at
@@ -72,7 +73,7 @@ enum RadioType {
};
// All data for the cell radio.
-struct RadioData {
+struct CONTENT_EXPORT RadioData {
RadioData();
~RadioData();
@@ -94,7 +95,7 @@ struct RadioData {
};
// Wifi data relating to a single access point.
-struct AccessPointData {
+struct CONTENT_EXPORT AccessPointData {
AccessPointData();
~AccessPointData();
@@ -116,7 +117,7 @@ struct AccessPointDataLess {
};
// All data for wifi.
-struct WifiData {
+struct CONTENT_EXPORT WifiData {
WifiData();
~WifiData();
@@ -134,7 +135,7 @@ class DeviceDataProvider;
// This class just exists to work-around MSVC2005 not being able to have a
// template class implement RefCountedThreadSafe
-class DeviceDataProviderImplBaseHack
+class CONTENT_EXPORT DeviceDataProviderImplBaseHack
: public base::RefCountedThreadSafe<DeviceDataProviderImplBaseHack> {
protected:
friend class base::RefCountedThreadSafe<DeviceDataProviderImplBaseHack>;
@@ -343,7 +344,8 @@ class DeviceDataProvider : public base::NonThreadSafe {
impl_->StopDataProvider();
}
- static DeviceDataProviderImplBase<DataType>* DefaultFactoryFunction();
+ static CONTENT_EXPORT DeviceDataProviderImplBase<DataType>*
+ DefaultFactoryFunction();
// The singleton-like instance of this class. (Not 'true' singleton, as it
// may go through multiple create/destroy/create cycles per process instance,
diff --git a/content/browser/geolocation/geolocation_observer.h b/content/browser/geolocation/geolocation_observer.h
index 68148ea..3110e00 100644
--- a/content/browser/geolocation/geolocation_observer.h
+++ b/content/browser/geolocation/geolocation_observer.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,12 +7,13 @@
#pragma once
#include "base/basictypes.h"
+#include "content/common/content_export.h"
struct Geoposition;
// This interface is implemented by observers of GeolocationProvider as
// well as GeolocationProvider itself as an observer of GeolocationArbitrator.
-class GeolocationObserver {
+class CONTENT_EXPORT GeolocationObserver {
public:
// This will be called whenever the 'best available' location is updated,
// or when an error is encountered meaning no location data will be
diff --git a/content/browser/geolocation/geolocation_provider.h b/content/browser/geolocation/geolocation_provider.h
index c57e692..5001fee 100644
--- a/content/browser/geolocation/geolocation_provider.h
+++ b/content/browser/geolocation/geolocation_provider.h
@@ -24,7 +24,8 @@ struct DefaultSingletonTraits;
// observers which will be notified of location updates. Underlying location
// arbitrator will only be enabled whilst there is at least one observer
// registered.
-class GeolocationProvider : public base::Thread, public GeolocationObserver {
+class CONTENT_EXPORT GeolocationProvider
+ : public base::Thread, public GeolocationObserver {
public:
GeolocationProvider();
@@ -42,7 +43,7 @@ class GeolocationProvider : public base::Thread, public GeolocationObserver {
// via AddObserver(). Returns true if the observer was removed.
bool RemoveObserver(GeolocationObserver* delegate);
- CONTENT_EXPORT void OnPermissionGranted(const GURL& requesting_frame);
+ void OnPermissionGranted(const GURL& requesting_frame);
bool HasPermissionBeenGranted() const;
// GeolocationObserver
@@ -51,7 +52,7 @@ class GeolocationProvider : public base::Thread, public GeolocationObserver {
// Gets a pointer to the singleton instance of the location relayer, which
// is in turn bound to the browser's global context objects. Ownership is NOT
// returned.
- CONTENT_EXPORT static GeolocationProvider* GetInstance();
+ static GeolocationProvider* GetInstance();
typedef std::map<GeolocationObserver*, GeolocationObserverOptions>
ObserverMap;
diff --git a/content/browser/geolocation/location_arbitrator.h b/content/browser/geolocation/location_arbitrator.h
index 5370cd1..ffe0182 100644
--- a/content/browser/geolocation/location_arbitrator.h
+++ b/content/browser/geolocation/location_arbitrator.h
@@ -12,6 +12,7 @@
#include "content/browser/geolocation/access_token_store.h"
#include "content/browser/geolocation/location_provider.h"
#include "content/browser/geolocation/geolocation_observer.h"
+#include "content/common/content_export.h"
#include "content/common/geoposition.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_context_getter.h"
@@ -30,7 +31,8 @@ struct Geoposition;
// This class is responsible for handling updates from multiple underlying
// providers and resolving them to a single 'best' location fix at any given
// moment.
-class GeolocationArbitrator : public LocationProviderBase::ListenerInterface {
+class CONTENT_EXPORT GeolocationArbitrator
+ : public LocationProviderBase::ListenerInterface {
public:
// Number of milliseconds newer a location provider has to be that it's worth
// switching to this location provider on the basis of it being fresher
diff --git a/content/browser/geolocation/location_provider.h b/content/browser/geolocation/location_provider.h
index 2c33e7d..b282527 100644
--- a/content/browser/geolocation/location_provider.h
+++ b/content/browser/geolocation/location_provider.h
@@ -17,6 +17,7 @@
#include "base/string16.h"
#include "base/threading/non_thread_safe.h"
+#include "content/common/content_export.h"
class AccessTokenStore;
struct Geoposition;
@@ -27,12 +28,13 @@ class URLRequestContextGetter;
}
// The base class used by all location providers.
-class LocationProviderBase : public base::NonThreadSafe {
+class CONTENT_EXPORT LocationProviderBase
+ : NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
// Clients of the location provider must implement this interface. All call-
// backs to this interface will happen in the context of the thread on which
// the location provider was created.
- class ListenerInterface {
+ class CONTENT_EXPORT ListenerInterface {
public:
// Used to inform listener that a new position fix is available or that a
// fatal error has occurred. Providers should call this for new listeners
@@ -90,7 +92,7 @@ class LocationProviderBase : public base::NonThreadSafe {
// Factory functions for the various types of location provider to abstract
// over the platform-dependent implementations.
-LocationProviderBase* NewNetworkLocationProvider(
+CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider(
AccessTokenStore* access_token_store,
net::URLRequestContextGetter* context,
const GURL& url,
diff --git a/content/browser/geolocation/network_location_provider.h b/content/browser/geolocation/network_location_provider.h
index b3ef8d0..738dca8 100644
--- a/content/browser/geolocation/network_location_provider.h
+++ b/content/browser/geolocation/network_location_provider.h
@@ -17,6 +17,7 @@
#include "content/browser/geolocation/device_data_provider.h"
#include "content/browser/geolocation/location_provider.h"
#include "content/browser/geolocation/network_location_request.h"
+#include "content/common/content_export.h"
#include "content/common/geoposition.h"
class URLFetcherProtectEntry;
@@ -28,7 +29,7 @@ class NetworkLocationProvider
public NetworkLocationRequest::ListenerInterface {
public:
// Cache of recently resolved locations. Public for tests.
- class PositionCache {
+ class CONTENT_EXPORT PositionCache {
public:
// The maximum size of the cache of positions for previously requested
// device data.
diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h
index 89e17ca..45f6806 100644
--- a/content/browser/geolocation/network_location_request.h
+++ b/content/browser/geolocation/network_location_request.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/geolocation/device_data_provider.h"
+#include "content/common/content_export.h"
#include "content/common/net/url_fetcher.h"
#include "googleurl/src/gurl.h"
@@ -29,7 +30,7 @@ struct Position;
class NetworkLocationRequest : private URLFetcher::Delegate {
public:
// ID passed to URLFetcher::Create(). Used for testing.
- static int url_fetcher_id_for_tests;
+ CONTENT_EXPORT static int url_fetcher_id_for_tests;
// Interface for receiving callbacks from a NetworkLocationRequest object.
class ListenerInterface {
public:
diff --git a/content/browser/geolocation/wifi_data_provider_common.h b/content/browser/geolocation/wifi_data_provider_common.h
index c42586e..1f11ef8 100644
--- a/content/browser/geolocation/wifi_data_provider_common.h
+++ b/content/browser/geolocation/wifi_data_provider_common.h
@@ -14,6 +14,7 @@
#include "base/task.h"
#include "base/threading/thread.h"
#include "content/browser/geolocation/device_data_provider.h"
+#include "content/common/content_export.h"
// Converts a MAC address stored as an array of uint8 to a string.
string16 MacAddressAsString16(const uint8 mac_as_int[6]);
@@ -64,7 +65,7 @@ class GenericPollingPolicy : public PollingPolicyInterface {
// both of which will be create & accessed in the worker thread (only).
// Also designed this way to promotes ease of testing the cross-platform
// behavior w.r.t. polling & threading.
-class WifiDataProviderCommon
+class CONTENT_EXPORT WifiDataProviderCommon
: public WifiDataProviderImplBase,
private base::Thread {
public:
diff --git a/content/browser/geolocation/wifi_data_provider_win.h b/content/browser/geolocation/wifi_data_provider_win.h
index c377628..3173755 100644
--- a/content/browser/geolocation/wifi_data_provider_win.h
+++ b/content/browser/geolocation/wifi_data_provider_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,10 +7,11 @@
#pragma once
#include "content/browser/geolocation/wifi_data_provider_common.h"
+#include "content/common/content_export.h"
class PollingPolicyInterface;
-class Win32WifiDataProvider : public WifiDataProviderCommon {
+class CONTENT_EXPORT Win32WifiDataProvider : public WifiDataProviderCommon {
public:
Win32WifiDataProvider();
diff --git a/content/browser/geolocation/win7_location_api_win.h b/content/browser/geolocation/win7_location_api_win.h
index c648b8c..a7be43c 100644
--- a/content/browser/geolocation/win7_location_api_win.h
+++ b/content/browser/geolocation/win7_location_api_win.h
@@ -13,6 +13,7 @@
#include "base/time.h"
#include "base/win/scoped_com_initializer.h"
+#include "content/common/content_export.h"
struct Geoposition;
@@ -20,7 +21,7 @@ struct Geoposition;
typedef HRESULT (WINAPI* PropVariantToDoubleFunction)
(REFPROPVARIANT propvarIn, DOUBLE *pdblRet);
-class Win7LocationApi {
+class CONTENT_EXPORT Win7LocationApi {
public:
virtual ~Win7LocationApi();
// Attempts to load propsys.dll, initialise |location_| and requests the user
diff --git a/content/browser/geolocation/win7_location_provider_win.h b/content/browser/geolocation/win7_location_provider_win.h
index 8a242ed..ff49494 100644
--- a/content/browser/geolocation/win7_location_provider_win.h
+++ b/content/browser/geolocation/win7_location_provider_win.h
@@ -9,6 +9,7 @@
#include "base/task.h"
#include "content/browser/geolocation/location_provider.h"
#include "content/browser/geolocation/win7_location_api_win.h"
+#include "content/common/content_export.h"
#include "content/common/geoposition.h"
// Location provider for Windows 7 that uses the Location and Sensors platform
@@ -17,7 +18,7 @@
// TODO(allanwoj): Possibly derive this class and the linux gps provider class
// from a single SystemLocationProvider class as their implementation is very
// similar.
-class Win7LocationProvider : public LocationProviderBase {
+class CONTENT_EXPORT Win7LocationProvider : public LocationProviderBase {
public:
Win7LocationProvider(Win7LocationApi* api);
virtual ~Win7LocationProvider();