OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 struct Geoposition; | 15 struct Geoposition; |
15 | 16 |
16 namespace WebKit { | 17 namespace WebKit { |
17 class WebGeolocationController; | 18 class WebGeolocationController; |
18 class WebGeolocationPermissionRequest; | 19 class WebGeolocationPermissionRequest; |
19 class WebGeolocationPermissionRequestManager; | 20 class WebGeolocationPermissionRequestManager; |
20 class WebGeolocationPosition; | 21 class WebGeolocationPosition; |
21 class WebSecurityOrigin; | 22 class WebSecurityOrigin; |
22 } | 23 } |
23 | 24 |
24 // GeolocationDispatcher is a delegate for Geolocation messages used by | 25 // GeolocationDispatcher is a delegate for Geolocation messages used by |
25 // WebKit. | 26 // WebKit. |
26 // It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). | 27 // It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). |
27 class GeolocationDispatcher : public content::RenderViewObserver, | 28 class GeolocationDispatcher : public content::RenderViewObserver, |
28 public WebKit::WebGeolocationClient { | 29 public WebKit::WebGeolocationClient { |
29 public: | 30 public: |
30 explicit GeolocationDispatcher(RenderView* render_view); | 31 explicit GeolocationDispatcher(RenderViewImpl* render_view); |
31 virtual ~GeolocationDispatcher(); | 32 virtual ~GeolocationDispatcher(); |
32 | 33 |
33 private: | 34 private: |
34 // RenderView::Observer implementation. | 35 // RenderView::Observer implementation. |
35 virtual bool OnMessageReceived(const IPC::Message& message); | 36 virtual bool OnMessageReceived(const IPC::Message& message); |
36 | 37 |
37 // WebGeolocationClient | 38 // WebGeolocationClient |
38 virtual void geolocationDestroyed(); | 39 virtual void geolocationDestroyed(); |
39 virtual void startUpdating(); | 40 virtual void startUpdating(); |
40 virtual void stopUpdating(); | 41 virtual void stopUpdating(); |
(...skipping 16 matching lines...) Expand all Loading... |
57 // invoked when the underlying object is destroyed. | 58 // invoked when the underlying object is destroyed. |
58 scoped_ptr< WebKit::WebGeolocationController> controller_; | 59 scoped_ptr< WebKit::WebGeolocationController> controller_; |
59 | 60 |
60 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> | 61 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> |
61 pending_permissions_; | 62 pending_permissions_; |
62 bool enable_high_accuracy_; | 63 bool enable_high_accuracy_; |
63 bool updating_; | 64 bool updating_; |
64 }; | 65 }; |
65 | 66 |
66 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ | 67 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ |
OLD | NEW |