| 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 #include "content/browser/geofencing/geofencing_dispatcher_host.h" | 5 #include "content/browser/geofencing/geofencing_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "content/browser/geofencing/geofencing_manager.h" | 7 #include "content/browser/geofencing/geofencing_manager.h" |
| 8 #include "content/browser/service_worker/service_worker_context_core.h" | 8 #include "content/browser/service_worker/service_worker_context_core.h" |
| 9 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 9 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 10 #include "content/browser/service_worker/service_worker_registration.h" | 10 #include "content/browser/service_worker/service_worker_registration.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 GeofencingDispatcherHost::~GeofencingDispatcherHost() { | 25 GeofencingDispatcherHost::~GeofencingDispatcherHost() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool GeofencingDispatcherHost::OnMessageReceived(const IPC::Message& message) { | 28 bool GeofencingDispatcherHost::OnMessageReceived(const IPC::Message& message) { |
| 29 bool handled = true; | 29 bool handled = true; |
| 30 IPC_BEGIN_MESSAGE_MAP(GeofencingDispatcherHost, message) | 30 IPC_BEGIN_MESSAGE_MAP(GeofencingDispatcherHost, message) |
| 31 IPC_MESSAGE_HANDLER(GeofencingHostMsg_RegisterRegion, OnRegisterRegion) | 31 IPC_MESSAGE_HANDLER(GeofencingHostMsg_RegisterRegion, OnRegisterRegion) |
| 32 IPC_MESSAGE_HANDLER(GeofencingHostMsg_UnregisterRegion, OnUnregisterRegion) | 32 IPC_MESSAGE_HANDLER(GeofencingHostMsg_UnregisterRegion, OnUnregisterRegion) |
| 33 IPC_MESSAGE_HANDLER(GeofencingHostMsg_GetRegisteredRegions, | 33 IPC_MESSAGE_HANDLER(GeofencingHostMsg_GetRegisteredRegions, |
| 34 OnGetRegisteredRegions) | 34 OnGetRegisteredRegions) |
| 35 IPC_MESSAGE_FORWARD(GeofencingHostMsg_SetMockProvider, manager_.get(), |
| 36 GeofencingManager::SetMockProvider) |
| 37 IPC_MESSAGE_FORWARD(GeofencingHostMsg_SetMockPosition, manager_.get(), |
| 38 GeofencingManager::SetMockPosition) |
| 35 IPC_MESSAGE_UNHANDLED(handled = false) | 39 IPC_MESSAGE_UNHANDLED(handled = false) |
| 36 IPC_END_MESSAGE_MAP() | 40 IPC_END_MESSAGE_MAP() |
| 37 return handled; | 41 return handled; |
| 38 } | 42 } |
| 39 | 43 |
| 40 void GeofencingDispatcherHost::OnRegisterRegion( | 44 void GeofencingDispatcherHost::OnRegisterRegion( |
| 41 int thread_id, | 45 int thread_id, |
| 42 int request_id, | 46 int request_id, |
| 43 const std::string& region_id, | 47 const std::string& region_id, |
| 44 const blink::WebCircularGeofencingRegion& region, | 48 const blink::WebCircularGeofencingRegion& region, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 106 |
| 103 void GeofencingDispatcherHost::UnregisterRegionCompleted( | 107 void GeofencingDispatcherHost::UnregisterRegionCompleted( |
| 104 int thread_id, | 108 int thread_id, |
| 105 int request_id, | 109 int request_id, |
| 106 GeofencingStatus status) { | 110 GeofencingStatus status) { |
| 107 Send(new GeofencingMsg_UnregisterRegionComplete( | 111 Send(new GeofencingMsg_UnregisterRegionComplete( |
| 108 thread_id, request_id, status)); | 112 thread_id, request_id, status)); |
| 109 } | 113 } |
| 110 | 114 |
| 111 } // namespace content | 115 } // namespace content |
| OLD | NEW |