| 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 #ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ | 5 #ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ |
| 6 #define CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ | 6 #define CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class GeolocationDispatcherOld : public WebKit::WebGeolocationService { | 26 class GeolocationDispatcherOld : public WebKit::WebGeolocationService { |
| 27 public: | 27 public: |
| 28 explicit GeolocationDispatcherOld(RenderView* render_view); | 28 explicit GeolocationDispatcherOld(RenderView* render_view); |
| 29 virtual ~GeolocationDispatcherOld(); | 29 virtual ~GeolocationDispatcherOld(); |
| 30 | 30 |
| 31 // Called to possibly handle the incoming IPC message. Returns true if | 31 // Called to possibly handle the incoming IPC message. Returns true if |
| 32 // handled. Called in render thread. | 32 // handled. Called in render thread. |
| 33 bool OnMessageReceived(const IPC::Message& msg); | 33 bool OnMessageReceived(const IPC::Message& msg); |
| 34 | 34 |
| 35 // WebKit::WebGeolocationService. | 35 // WebKit::WebGeolocationService. |
| 36 void requestPermissionForFrame(int bridge_id, const WebKit::WebURL& url); | 36 virtual void requestPermissionForFrame(int bridge_id, |
| 37 void cancelPermissionRequestForFrame( | 37 const WebKit::WebURL& url); |
| 38 virtual void cancelPermissionRequestForFrame( |
| 38 int bridge_id, const WebKit::WebURL& url); | 39 int bridge_id, const WebKit::WebURL& url); |
| 39 void startUpdating( | 40 virtual void startUpdating( |
| 40 int bridge_id, const WebKit::WebURL& url, bool enableHighAccuracy); | 41 int bridge_id, const WebKit::WebURL& url, bool enableHighAccuracy); |
| 41 void stopUpdating(int bridge_id); | 42 virtual void stopUpdating(int bridge_id); |
| 42 void suspend(int bridge_id); | 43 virtual void suspend(int bridge_id); |
| 43 void resume(int bridge_id); | 44 virtual void resume(int bridge_id); |
| 44 int attachBridge(WebKit::WebGeolocationServiceBridge* geolocation_service); | 45 virtual int attachBridge( |
| 45 void detachBridge(int bridge_id); | 46 WebKit::WebGeolocationServiceBridge* geolocation_service); |
| 47 virtual void detachBridge(int bridge_id); |
| 46 | 48 |
| 47 private: | 49 private: |
| 48 // Permission for using geolocation has been set. | 50 // Permission for using geolocation has been set. |
| 49 void OnGeolocationPermissionSet(int bridge_id, bool is_allowed); | 51 void OnGeolocationPermissionSet(int bridge_id, bool is_allowed); |
| 50 | 52 |
| 51 // We have an updated geolocation position or error code. | 53 // We have an updated geolocation position or error code. |
| 52 void OnGeolocationPositionUpdated(const Geoposition& geoposition); | 54 void OnGeolocationPositionUpdated(const Geoposition& geoposition); |
| 53 | 55 |
| 54 RenderView* render_view_; | 56 RenderView* render_view_; |
| 55 | 57 |
| 56 // The geolocation services attached to this dispatcher. | 58 // The geolocation services attached to this dispatcher. |
| 57 IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; | 59 IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; |
| 58 | 60 |
| 59 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherOld); | 61 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherOld); |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 #endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ | 64 #endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ |
| OLD | NEW |