| 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" | 
| 11 #include "content/child/worker_task_runner.h" | 11 #include "content/child/worker_task_runner.h" | 
| 12 #include "content/common/geofencing_status.h" | 12 #include "content/common/geofencing_types.h" | 
| 13 #include "third_party/WebKit/public/platform/WebGeofencingProvider.h" | 13 #include "third_party/WebKit/public/platform/WebGeofencingProvider.h" | 
| 14 | 14 | 
| 15 namespace base { | 15 namespace base { | 
| 16 class MessageLoop; | 16 class MessageLoop; | 
| 17 class TaskRunner; | 17 class TaskRunner; | 
| 18 } | 18 } | 
| 19 | 19 | 
| 20 namespace IPC { | 20 namespace IPC { | 
| 21 class Message; | 21 class Message; | 
| 22 } | 22 } | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 38       const blink::WebCircularGeofencingRegion& region, | 38       const blink::WebCircularGeofencingRegion& region, | 
| 39       blink::WebServiceWorkerRegistration* service_worker_registration, | 39       blink::WebServiceWorkerRegistration* service_worker_registration, | 
| 40       blink::WebGeofencingCallbacks* callbacks); | 40       blink::WebGeofencingCallbacks* callbacks); | 
| 41   void UnregisterRegion( | 41   void UnregisterRegion( | 
| 42       const blink::WebString& region_id, | 42       const blink::WebString& region_id, | 
| 43       blink::WebServiceWorkerRegistration* service_worker_registration, | 43       blink::WebServiceWorkerRegistration* service_worker_registration, | 
| 44       blink::WebGeofencingCallbacks* callbacks); | 44       blink::WebGeofencingCallbacks* callbacks); | 
| 45   void GetRegisteredRegions( | 45   void GetRegisteredRegions( | 
| 46       blink::WebServiceWorkerRegistration* service_worker_registration, | 46       blink::WebServiceWorkerRegistration* service_worker_registration, | 
| 47       blink::WebGeofencingRegionsCallbacks* callbacks); | 47       blink::WebGeofencingRegionsCallbacks* callbacks); | 
|  | 48   void SetMockProvider( | 
|  | 49       blink::WebServiceWorkerRegistration* service_worker_registration, | 
|  | 50       bool service_available); | 
|  | 51   void ClearMockProvider( | 
|  | 52       blink::WebServiceWorkerRegistration* service_worker_registration); | 
|  | 53   void SetMockPosition( | 
|  | 54       blink::WebServiceWorkerRegistration* service_worker_registration, | 
|  | 55       double latitude, | 
|  | 56       double longitude); | 
| 48 | 57 | 
| 49   // |thread_safe_sender| needs to be passed in because if the call leads to | 58   // |thread_safe_sender| needs to be passed in because if the call leads to | 
| 50   // construction it will be needed. | 59   // construction it will be needed. | 
| 51   static GeofencingDispatcher* GetOrCreateThreadSpecificInstance( | 60   static GeofencingDispatcher* GetOrCreateThreadSpecificInstance( | 
| 52       ThreadSafeSender* thread_safe_sender); | 61       ThreadSafeSender* thread_safe_sender); | 
| 53 | 62 | 
| 54   // Unlike GetOrCreateThreadSpecificInstance() this doesn't create a new | 63   // Unlike GetOrCreateThreadSpecificInstance() this doesn't create a new | 
| 55   // instance if thread-local instance doesn't exist. | 64   // instance if thread-local instance doesn't exist. | 
| 56   static GeofencingDispatcher* GetThreadSpecificInstance(); | 65   static GeofencingDispatcher* GetThreadSpecificInstance(); | 
| 57 | 66 | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 78       region_unregistration_requests_; | 87       region_unregistration_requests_; | 
| 79   IDMap<blink::WebGeofencingRegionsCallbacks, IDMapOwnPointer> | 88   IDMap<blink::WebGeofencingRegionsCallbacks, IDMapOwnPointer> | 
| 80       get_registered_regions_requests_; | 89       get_registered_regions_requests_; | 
| 81 | 90 | 
| 82   DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcher); | 91   DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcher); | 
| 83 }; | 92 }; | 
| 84 | 93 | 
| 85 }  // namespace content | 94 }  // namespace content | 
| 86 | 95 | 
| 87 #endif  // CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ | 96 #endif  // CONTENT_CHILD_GEOFENCING_GEOFENCING_DISPATCHER_H_ | 
| OLD | NEW | 
|---|