OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/geolocation_dispatcher.h" | 5 #include "content/renderer/geolocation_dispatcher.h" |
6 | 6 |
7 #include "content/common/geolocation_messages.h" | 7 #include "content/common/geolocation_messages.h" |
8 #include "content/renderer/render_view_impl.h" | 8 #include "content/renderer/render_view_impl.h" |
9 #include "third_party/WebKit/public/platform/WebString.h" | 9 #include "third_party/WebKit/public/platform/WebString.h" |
10 #include "third_party/WebKit/public/web/WebGeolocationPermissionRequest.h" | 10 #include "third_party/WebKit/public/web/WebGeolocationPermissionRequest.h" |
11 #include "third_party/WebKit/public/web/WebGeolocationPermissionRequestManager.h
" | 11 #include "third_party/WebKit/public/web/WebGeolocationPermissionRequestManager.h
" |
12 #include "third_party/WebKit/public/web/WebGeolocationClient.h" | 12 #include "third_party/WebKit/public/web/WebGeolocationClient.h" |
13 #include "third_party/WebKit/public/web/WebGeolocationPosition.h" | 13 #include "third_party/WebKit/public/web/WebGeolocationPosition.h" |
14 #include "third_party/WebKit/public/web/WebGeolocationError.h" | 14 #include "third_party/WebKit/public/web/WebGeolocationError.h" |
15 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 15 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
16 | 16 |
17 using blink::WebGeolocationController; | 17 using blink::WebGeolocationController; |
18 using blink::WebGeolocationError; | 18 using blink::WebGeolocationError; |
19 using blink::WebGeolocationPermissionRequest; | 19 using blink::WebGeolocationPermissionRequest; |
20 using blink::WebGeolocationPermissionRequestManager; | 20 using blink::WebGeolocationPermissionRequestManager; |
21 using blink::WebGeolocationPosition; | 21 using blink::WebGeolocationPosition; |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 GeolocationDispatcher::GeolocationDispatcher(RenderViewImpl* render_view) | 25 GeolocationDispatcher::GeolocationDispatcher(RenderFrame* render_frame) |
26 : RenderViewObserver(render_view), | 26 : RenderFrameObserver(render_frame), |
27 pending_permissions_(new WebGeolocationPermissionRequestManager()), | 27 pending_permissions_(new WebGeolocationPermissionRequestManager()), |
28 enable_high_accuracy_(false), | 28 enable_high_accuracy_(false), |
29 updating_(false) { | 29 updating_(false) { |
30 } | 30 } |
31 | 31 |
32 GeolocationDispatcher::~GeolocationDispatcher() {} | 32 GeolocationDispatcher::~GeolocationDispatcher() {} |
33 | 33 |
34 bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) { | 34 bool GeolocationDispatcher::OnMessageReceived(const IPC::Message& message) { |
35 bool handled = true; | 35 bool handled = true; |
36 IPC_BEGIN_MESSAGE_MAP(GeolocationDispatcher, message) | 36 IPC_BEGIN_MESSAGE_MAP(GeolocationDispatcher, message) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 NOTREACHED() << geoposition.error_code; | 150 NOTREACHED() << geoposition.error_code; |
151 return; | 151 return; |
152 } | 152 } |
153 controller_->errorOccurred( | 153 controller_->errorOccurred( |
154 WebGeolocationError( | 154 WebGeolocationError( |
155 code, blink::WebString::fromUTF8(geoposition.error_message))); | 155 code, blink::WebString::fromUTF8(geoposition.error_message))); |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 } // namespace content | 159 } // namespace content |
OLD | NEW |