| 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 #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 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/renderer/render_view_observer.h" | 9 #include "content/public/renderer/render_view_observer.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.
h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClient.
h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationControl
ler.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationControl
ler.h" |
| 12 | 12 |
| 13 class RenderViewImpl; | |
| 14 | |
| 15 namespace content { | |
| 16 struct Geoposition; | |
| 17 } | |
| 18 | |
| 19 namespace WebKit { | 13 namespace WebKit { |
| 20 class WebGeolocationController; | 14 class WebGeolocationController; |
| 21 class WebGeolocationPermissionRequest; | 15 class WebGeolocationPermissionRequest; |
| 22 class WebGeolocationPermissionRequestManager; | 16 class WebGeolocationPermissionRequestManager; |
| 23 class WebGeolocationPosition; | 17 class WebGeolocationPosition; |
| 24 } | 18 } |
| 25 | 19 |
| 20 namespace content { |
| 21 class RenderViewImpl; |
| 22 struct Geoposition; |
| 23 |
| 26 // GeolocationDispatcher is a delegate for Geolocation messages used by | 24 // GeolocationDispatcher is a delegate for Geolocation messages used by |
| 27 // WebKit. | 25 // WebKit. |
| 28 // It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). | 26 // It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). |
| 29 class GeolocationDispatcher : public content::RenderViewObserver, | 27 class GeolocationDispatcher : public RenderViewObserver, |
| 30 public WebKit::WebGeolocationClient { | 28 public WebKit::WebGeolocationClient { |
| 31 public: | 29 public: |
| 32 explicit GeolocationDispatcher(RenderViewImpl* render_view); | 30 explicit GeolocationDispatcher(RenderViewImpl* render_view); |
| 33 virtual ~GeolocationDispatcher(); | 31 virtual ~GeolocationDispatcher(); |
| 34 | 32 |
| 35 private: | 33 private: |
| 36 // RenderView::Observer implementation. | 34 // RenderView::Observer implementation. |
| 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 38 | 36 |
| 39 // WebGeolocationClient | 37 // WebGeolocationClient |
| (...skipping 18 matching lines...) Expand all Loading... |
| 58 // WebCore::GeolocationController. geolocationDestroyed() is | 56 // WebCore::GeolocationController. geolocationDestroyed() is |
| 59 // invoked when the underlying object is destroyed. | 57 // invoked when the underlying object is destroyed. |
| 60 scoped_ptr< WebKit::WebGeolocationController> controller_; | 58 scoped_ptr< WebKit::WebGeolocationController> controller_; |
| 61 | 59 |
| 62 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> | 60 scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> |
| 63 pending_permissions_; | 61 pending_permissions_; |
| 64 bool enable_high_accuracy_; | 62 bool enable_high_accuracy_; |
| 65 bool updating_; | 63 bool updating_; |
| 66 }; | 64 }; |
| 67 | 65 |
| 66 } // namespace content |
| 67 |
| 68 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ | 68 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ |
| OLD | NEW |