OLD | NEW |
1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ |
6 #define CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/renderer/render_view_observer.h" | 10 #include "content/public/renderer/render_view_observer.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.
h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.
h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationControl
ler.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationControl
ler.h" |
13 | 13 |
14 class RenderViewImpl; | 14 class RenderViewImpl; |
| 15 |
| 16 namespace content { |
15 struct Geoposition; | 17 struct Geoposition; |
| 18 } |
16 | 19 |
17 namespace WebKit { | 20 namespace WebKit { |
18 class WebGeolocationController; | 21 class WebGeolocationController; |
19 class WebGeolocationPermissionRequest; | 22 class WebGeolocationPermissionRequest; |
20 class WebGeolocationPermissionRequestManager; | 23 class WebGeolocationPermissionRequestManager; |
21 class WebGeolocationPosition; | 24 class WebGeolocationPosition; |
22 } | 25 } |
23 | 26 |
24 // GeolocationDispatcher is a delegate for Geolocation messages used by | 27 // GeolocationDispatcher is a delegate for Geolocation messages used by |
25 // WebKit. | 28 // WebKit. |
(...skipping 17 matching lines...) Expand all Loading... |
43 virtual bool lastPosition(WebKit::WebGeolocationPosition& position); | 46 virtual bool lastPosition(WebKit::WebGeolocationPosition& position); |
44 virtual void requestPermission( | 47 virtual void requestPermission( |
45 const WebKit::WebGeolocationPermissionRequest& permissionRequest); | 48 const WebKit::WebGeolocationPermissionRequest& permissionRequest); |
46 virtual void cancelPermissionRequest( | 49 virtual void cancelPermissionRequest( |
47 const WebKit::WebGeolocationPermissionRequest& permissionRequest); | 50 const WebKit::WebGeolocationPermissionRequest& permissionRequest); |
48 | 51 |
49 // Permission for using geolocation has been set. | 52 // Permission for using geolocation has been set. |
50 void OnPermissionSet(int bridge_id, bool is_allowed); | 53 void OnPermissionSet(int bridge_id, bool is_allowed); |
51 | 54 |
52 // We have an updated geolocation position or error code. | 55 // We have an updated geolocation position or error code. |
53 void OnPositionUpdated(const Geoposition& geoposition); | 56 void OnPositionUpdated(const content::Geoposition& geoposition); |
54 | 57 |
55 // The controller_ is valid for the lifetime of the underlying | 58 // The controller_ is valid for the lifetime of the underlying |
56 // WebCore::GeolocationController. geolocationDestroyed() is | 59 // WebCore::GeolocationController. geolocationDestroyed() is |
57 // invoked when the underlying object is destroyed. | 60 // invoked when the underlying object is destroyed. |
58 scoped_ptr< WebKit::WebGeolocationController> controller_; | 61 scoped_ptr< WebKit::WebGeolocationController> controller_; |
59 | 62 |
60 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> | 63 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> |
61 pending_permissions_; | 64 pending_permissions_; |
62 bool enable_high_accuracy_; | 65 bool enable_high_accuracy_; |
63 bool updating_; | 66 bool updating_; |
64 }; | 67 }; |
65 | 68 |
66 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ | 69 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ |
OLD | NEW |