Chromium Code Reviews| 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_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ | 6 #define CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 public: | 28 public: |
| 29 explicit GeofencingDispatcher(ThreadSafeSender* sender); | 29 explicit GeofencingDispatcher(ThreadSafeSender* sender); |
| 30 virtual ~GeofencingDispatcher(); | 30 virtual ~GeofencingDispatcher(); |
| 31 | 31 |
| 32 bool Send(IPC::Message* msg); | 32 bool Send(IPC::Message* msg); |
| 33 void OnMessageReceived(const IPC::Message& msg); | 33 void OnMessageReceived(const IPC::Message& msg); |
| 34 | 34 |
| 35 // Corresponding to WebGeofencingProvider methods. | 35 // Corresponding to WebGeofencingProvider methods. |
| 36 void RegisterRegion(const blink::WebString& region_id, | 36 void RegisterRegion(const blink::WebString& region_id, |
| 37 const blink::WebCircularGeofencingRegion& region, | 37 const blink::WebCircularGeofencingRegion& region, |
| 38 blink::WebServiceWorkerRegistration* serviceworker, | |
|
Michael van Ouwerkerk
2014/10/09 12:28:10
Let's call it service_worker_registration, here an
Marijn Kruisselbrink
2014/10/13 19:29:48
Done.
| |
| 38 blink::WebGeofencingCallbacks* callbacks); | 39 blink::WebGeofencingCallbacks* callbacks); |
| 39 void UnregisterRegion(const blink::WebString& region_id, | 40 void UnregisterRegion(const blink::WebString& region_id, |
| 41 blink::WebServiceWorkerRegistration* serviceworker, | |
| 40 blink::WebGeofencingCallbacks* callbacks); | 42 blink::WebGeofencingCallbacks* callbacks); |
| 41 void GetRegisteredRegions(blink::WebGeofencingRegionsCallbacks* callbacks); | 43 void GetRegisteredRegions(blink::WebServiceWorkerRegistration* serviceworker, |
| 44 blink::WebGeofencingRegionsCallbacks* callbacks); | |
| 42 | 45 |
| 43 // |thread_safe_sender| needs to be passed in because if the call leads to | 46 // |thread_safe_sender| needs to be passed in because if the call leads to |
| 44 // construction it will be needed. | 47 // construction it will be needed. |
| 45 static GeofencingDispatcher* GetOrCreateThreadSpecificInstance( | 48 static GeofencingDispatcher* GetOrCreateThreadSpecificInstance( |
| 46 ThreadSafeSender* thread_safe_sender); | 49 ThreadSafeSender* thread_safe_sender); |
| 47 | 50 |
| 48 // Unlike GetOrCreateThreadSpecificInstance() this doesn't create a new | 51 // Unlike GetOrCreateThreadSpecificInstance() this doesn't create a new |
| 49 // instance if thread-local instance doesn't exist. | 52 // instance if thread-local instance doesn't exist. |
| 50 static GeofencingDispatcher* GetThreadSpecificInstance(); | 53 static GeofencingDispatcher* GetThreadSpecificInstance(); |
| 51 | 54 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 72 region_unregistration_requests_; | 75 region_unregistration_requests_; |
| 73 IDMap<blink::WebGeofencingRegionsCallbacks, IDMapOwnPointer> | 76 IDMap<blink::WebGeofencingRegionsCallbacks, IDMapOwnPointer> |
| 74 get_registered_regions_requests_; | 77 get_registered_regions_requests_; |
| 75 | 78 |
| 76 DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcher); | 79 DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcher); |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 } // namespace content | 82 } // namespace content |
| 80 | 83 |
| 81 #endif // CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ | 84 #endif // CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ |
| OLD | NEW |