OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GEOFENCING_GEOFENCING_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_ |
6 #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_ | 6 #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const std::string& region_id); | 109 const std::string& region_id); |
110 | 110 |
111 // Looks up a particular geofence registration. Returns nullptr if no | 111 // Looks up a particular geofence registration. Returns nullptr if no |
112 // registration with the given ID exists. | 112 // registration with the given ID exists. |
113 Registration* FindRegistrationById(int64 geofencing_registration_id); | 113 Registration* FindRegistrationById(int64 geofencing_registration_id); |
114 | 114 |
115 // Registers a new registration, returning a reference to the newly inserted | 115 // Registers a new registration, returning a reference to the newly inserted |
116 // object. Assumes no registration with the same IDs currently exists. | 116 // object. Assumes no registration with the same IDs currently exists. |
117 Registration& AddRegistration( | 117 Registration& AddRegistration( |
118 int64 service_worker_registration_id, | 118 int64 service_worker_registration_id, |
| 119 const GURL& service_worker_origin, |
119 const std::string& region_id, | 120 const std::string& region_id, |
120 const blink::WebCircularGeofencingRegion& region, | 121 const blink::WebCircularGeofencingRegion& region, |
121 const StatusCallback& callback, | 122 const StatusCallback& callback, |
122 int64 geofencing_registration_id); | 123 int64 geofencing_registration_id); |
123 | 124 |
124 // Clears a registration. | 125 // Clears a registration. |
125 void ClearRegistration(Registration* registration); | 126 void ClearRegistration(Registration* registration); |
126 | 127 |
127 // Map of all registered regions for a particular service worker registration. | 128 // Map of all registered regions for a particular service worker registration. |
128 typedef std::map<std::string, Registration> RegionIdRegistrationMap; | 129 typedef std::map<std::string, Registration> RegionIdRegistrationMap; |
(...skipping 10 matching lines...) Expand all Loading... |
139 | 140 |
140 GeofencingService* service_; | 141 GeofencingService* service_; |
141 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; | 142 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(GeofencingManager); | 144 DISALLOW_COPY_AND_ASSIGN(GeofencingManager); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace content | 147 } // namespace content |
147 | 148 |
148 #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_ | 149 #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_MANAGER_H_ |
OLD | NEW |