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

Side by Side Diff: content/browser/geofencing/geofencing_manager.h

Issue 623823002: Chrome side of passing on the service worker registration with geofencing API calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 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
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
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_
OLDNEW
« no previous file with comments | « content/browser/geofencing/geofencing_dispatcher_host.cc ('k') | content/browser/geofencing/geofencing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698