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

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

Issue 10107017: Remove requesting_frame parameters from Geolocation stack (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comment addressed. Created 8 years, 8 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) 2011 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 declares GPS providers that run on linux. Currently, just uses 5 // This file declares GPS providers that run on linux. Currently, just uses
6 // the libgps (gpsd) API. Public for testing only - for normal usage this 6 // the libgps (gpsd) API. Public for testing only - for normal usage this
7 // header should not be required, as location_provider.h declares the needed 7 // header should not be required, as location_provider.h declares the needed
8 // factory function. 8 // factory function.
9 9
10 #ifndef CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_ 10 #ifndef CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_
11 #define CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_ 11 #define CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_
(...skipping 29 matching lines...) Expand all
41 } 41 }
42 void SetPollPeriodStationaryMillis(int value) { 42 void SetPollPeriodStationaryMillis(int value) {
43 poll_period_stationary_millis_ = value; 43 poll_period_stationary_millis_ = value;
44 } 44 }
45 45
46 // LocationProvider 46 // LocationProvider
47 virtual bool StartProvider(bool high_accuracy) OVERRIDE; 47 virtual bool StartProvider(bool high_accuracy) OVERRIDE;
48 virtual void StopProvider() OVERRIDE; 48 virtual void StopProvider() OVERRIDE;
49 virtual void GetPosition(Geoposition* position) OVERRIDE; 49 virtual void GetPosition(Geoposition* position) OVERRIDE;
50 virtual void UpdatePosition() OVERRIDE; 50 virtual void UpdatePosition() OVERRIDE;
51 virtual void OnPermissionGranted(const GURL& requesting_frame) OVERRIDE;
52 51
53 private: 52 private:
54 // Task which run in the child thread. 53 // Task which run in the child thread.
55 void DoGpsPollTask(); 54 void DoGpsPollTask();
56 55
57 // Will schedule a poll; i.e. enqueue DoGpsPollTask deferred task. 56 // Will schedule a poll; i.e. enqueue DoGpsPollTask deferred task.
58 void ScheduleNextGpsPoll(int interval); 57 void ScheduleNextGpsPoll(int interval);
59 58
60 int gpsd_reconnect_interval_millis_; 59 int gpsd_reconnect_interval_millis_;
61 int poll_period_moving_millis_; 60 int poll_period_moving_millis_;
62 int poll_period_stationary_millis_; 61 int poll_period_stationary_millis_;
63 62
64 const LibGpsFactory libgps_factory_; 63 const LibGpsFactory libgps_factory_;
65 scoped_ptr<LibGps> gps_; 64 scoped_ptr<LibGps> gps_;
66 Geoposition position_; 65 Geoposition position_;
67 66
68 // Holder for the tasks which run on the thread; takes care of cleanup. 67 // Holder for the tasks which run on the thread; takes care of cleanup.
69 base::WeakPtrFactory<GpsLocationProviderLinux> weak_factory_; 68 base::WeakPtrFactory<GpsLocationProviderLinux> weak_factory_;
70 }; 69 };
71 70
72 #endif // CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_ 71 #endif // CONTENT_BROWSER_GEOLOCATION_GPS_LOCATION_PROVIDER_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698