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_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "content/common/geofencing_status.h" | 8 #include "content/common/geofencing_status.h" |
| 9 #include "content/public/browser/browser_message_filter.h" | 9 #include "content/public/browser/browser_message_filter.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 struct WebCircularGeofencingRegion; | 12 struct WebCircularGeofencingRegion; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class GeofencingManager; | 17 class GeofencingManager; |
| 18 class ServiceWorkerContextWrapper; | |
| 18 | 19 |
| 19 class GeofencingDispatcherHost : public BrowserMessageFilter { | 20 class GeofencingDispatcherHost : public BrowserMessageFilter { |
| 20 public: | 21 public: |
| 21 explicit GeofencingDispatcherHost(GeofencingManager* geofencing_manager); | 22 explicit GeofencingDispatcherHost(GeofencingManager* geofencing_manager); |
| 22 | 23 |
| 23 private: | 24 private: |
| 24 virtual ~GeofencingDispatcherHost(); | 25 virtual ~GeofencingDispatcherHost(); |
| 25 | 26 |
| 26 // BrowserMessageFilter implementation. | 27 // BrowserMessageFilter implementation. |
| 27 virtual bool OnMessageReceived(const IPC::Message& message) override; | 28 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 28 | 29 |
| 29 void OnRegisterRegion(int thread_id, | 30 void OnRegisterRegion(int thread_id, |
| 30 int request_id, | 31 int request_id, |
| 31 const std::string& region_id, | 32 const std::string& region_id, |
| 32 const blink::WebCircularGeofencingRegion& region); | 33 const blink::WebCircularGeofencingRegion& region, |
| 34 int64 service_worker_registration_id); | |
| 33 void OnUnregisterRegion(int thread_id, | 35 void OnUnregisterRegion(int thread_id, |
| 34 int request_id, | 36 int request_id, |
| 35 const std::string& region_id); | 37 const std::string& region_id, |
|
palmer
2014/10/16 01:22:34
What is the lexical/syntactic structure of these r
Marijn Kruisselbrink
2014/10/16 17:00:19
There is no lexical/syntactic structure, these are
| |
| 36 void OnGetRegisteredRegions(int thread_id, int request_id); | 38 int64 service_worker_registration_id); |
| 39 void OnGetRegisteredRegions(int thread_id, | |
| 40 int request_id, | |
| 41 int64 service_worker_registration_id); | |
| 37 | 42 |
| 38 void RegisterRegionCompleted(int thread_id, | 43 void RegisterRegionCompleted(int thread_id, |
| 39 int request_id, | 44 int request_id, |
| 40 GeofencingStatus result); | 45 GeofencingStatus result); |
| 41 void UnregisterRegionCompleted(int thread_id, | 46 void UnregisterRegionCompleted(int thread_id, |
| 42 int request_id, | 47 int request_id, |
| 43 GeofencingStatus result); | 48 GeofencingStatus result); |
| 44 | 49 |
| 45 scoped_refptr<GeofencingManager> manager_; | 50 scoped_refptr<GeofencingManager> manager_; |
| 46 base::WeakPtrFactory<GeofencingDispatcherHost> weak_factory_; | 51 base::WeakPtrFactory<GeofencingDispatcherHost> weak_factory_; |
| 47 | 52 |
| 48 DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcherHost); | 53 DISALLOW_COPY_AND_ASSIGN(GeofencingDispatcherHost); |
| 49 }; | 54 }; |
| 50 | 55 |
| 51 } // namespace content | 56 } // namespace content |
| 52 | 57 |
| 53 #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ | 58 #endif // CONTENT_BROWSER_GEOFENCING_GEOFENCING_DISPATCHER_HOST_H_ |
| OLD | NEW |