OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/geolocation/geolocation_dispatcher_host.h" | 5 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "content/browser/geolocation/geolocation_permission_context.h" | 11 #include "content/browser/geolocation/geolocation_permission_context.h" |
12 #include "content/browser/geolocation/geolocation_provider.h" | 12 #include "content/browser/geolocation/geolocation_provider.h" |
13 #include "content/browser/renderer_host/render_message_filter.h" | 13 #include "content/browser/renderer_host/render_message_filter.h" |
14 #include "content/browser/renderer_host/render_process_host.h" | 14 #include "content/browser/renderer_host/render_process_host.h" |
15 #include "content/browser/renderer_host/render_view_host.h" | 15 #include "content/browser/renderer_host/render_view_host.h" |
16 #include "content/common/geolocation_messages.h" | 16 #include "content/common/geolocation_messages.h" |
17 #include "content/common/geoposition.h" | 17 #include "content/common/geoposition.h" |
18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
19 namespace { | 21 namespace { |
20 class GeolocationDispatcherHostImpl : public GeolocationDispatcherHost, | 22 class GeolocationDispatcherHostImpl : public GeolocationDispatcherHost, |
21 public GeolocationObserver { | 23 public GeolocationObserver { |
22 public: | 24 public: |
23 GeolocationDispatcherHostImpl( | 25 GeolocationDispatcherHostImpl( |
24 int render_process_id, | 26 int render_process_id, |
25 GeolocationPermissionContext* geolocation_permission_context); | 27 GeolocationPermissionContext* geolocation_permission_context); |
26 | 28 |
27 // GeolocationDispatcherHost | 29 // GeolocationDispatcherHost |
28 virtual bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok); | 30 virtual bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 177 } |
176 } // namespace | 178 } // namespace |
177 | 179 |
178 GeolocationDispatcherHost* GeolocationDispatcherHost::New( | 180 GeolocationDispatcherHost* GeolocationDispatcherHost::New( |
179 int render_process_id, | 181 int render_process_id, |
180 GeolocationPermissionContext* geolocation_permission_context) { | 182 GeolocationPermissionContext* geolocation_permission_context) { |
181 return new GeolocationDispatcherHostImpl( | 183 return new GeolocationDispatcherHostImpl( |
182 render_process_id, | 184 render_process_id, |
183 geolocation_permission_context); | 185 geolocation_permission_context); |
184 } | 186 } |
OLD | NEW |