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

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

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing meacer@ comments Created 6 years, 4 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_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Updates the geolocation provider with the currently required update 54 // Updates the geolocation provider with the currently required update
55 // options. 55 // options.
56 void RefreshGeolocationOptions(); 56 void RefreshGeolocationOptions();
57 57
58 void OnLocationUpdate(const Geoposition& position); 58 void OnLocationUpdate(const Geoposition& position);
59 59
60 void SendGeolocationPermissionResponse(int render_process_id, 60 void SendGeolocationPermissionResponse(int render_process_id,
61 int render_frame_id, 61 int render_frame_id,
62 int bridge_id, 62 int bridge_id,
63 int choice,
63 bool allowed); 64 bool allowed);
64 65
65 // A map from the RenderFrameHosts that have requested geolocation updates to 66 // A map from the RenderFrameHosts that have requested geolocation updates to
66 // the type of accuracy they requested (true = high accuracy). 67 // the type of accuracy they requested (true = high accuracy).
67 std::map<RenderFrameHost*, bool> updating_frames_; 68 std::map<RenderFrameHost*, bool> updating_frames_;
68 bool paused_; 69 bool paused_;
69 70
71 // User's preference for geolocation sharing precision.
72 int geolocationPrecision_;
73
70 struct PendingPermission { 74 struct PendingPermission {
71 PendingPermission(int render_frame_id, 75 PendingPermission(int render_frame_id,
72 int render_process_id, 76 int render_process_id,
73 int bridge_id); 77 int bridge_id);
74 ~PendingPermission(); 78 ~PendingPermission();
75 int render_frame_id; 79 int render_frame_id;
76 int render_process_id; 80 int render_process_id;
77 int bridge_id; 81 int bridge_id;
78 base::Closure cancel; 82 base::Closure cancel;
79 }; 83 };
80 std::vector<PendingPermission> pending_permissions_; 84 std::vector<PendingPermission> pending_permissions_;
81 85
82 scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_; 86 scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
83 87
84 base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_; 88 base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_;
85 89
86 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost); 90 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
87 }; 91 };
88 92
89 } // namespace content 93 } // namespace content
90 94
91 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ 95 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698