| 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 #if !defined(ENABLE_CLIENT_BASED_GEOLOCATION) | |
| 10 // TODO(jknotten): Remove this class once the new client-based implementation is | |
| 11 // checked in (see http://crbug.com/59908). | |
| 12 | |
| 13 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 14 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| 15 #include "ipc/ipc_message.h" | 11 #include "ipc/ipc_message.h" |
| 16 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 17 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationService.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationService.h" |
| 18 | 14 |
| 19 class GURL; | 15 class GURL; |
| 20 class RenderView; | 16 class RenderView; |
| 21 struct Geoposition; | 17 struct Geoposition; |
| 22 | 18 |
| 23 // GeolocationDispatcherOld is a delegate for Geolocation messages used by | 19 // GeolocationDispatcherOld is a delegate for Geolocation messages used by |
| 24 // WebKit. | 20 // WebKit. |
| 25 // It's the complement of GeolocationDispatcherHostOld (owned by | 21 // It's the complement of GeolocationDispatcherHostOld (owned by |
| 26 // RenderViewHost). | 22 // RenderViewHost). |
| 27 | 23 |
| 24 // TODO(jknotten): Remove this class once the new client-based implementation is |
| 25 // checked in (see http://crbug.com/59908). |
| 28 class GeolocationDispatcherOld : public WebKit::WebGeolocationService { | 26 class GeolocationDispatcherOld : public WebKit::WebGeolocationService { |
| 29 public: | 27 public: |
| 30 explicit GeolocationDispatcherOld(RenderView* render_view); | 28 explicit GeolocationDispatcherOld(RenderView* render_view); |
| 31 virtual ~GeolocationDispatcherOld(); | 29 virtual ~GeolocationDispatcherOld(); |
| 32 | 30 |
| 33 // Called to possibly handle the incoming IPC message. Returns true if | 31 // Called to possibly handle the incoming IPC message. Returns true if |
| 34 // handled. Called in render thread. | 32 // handled. Called in render thread. |
| 35 bool OnMessageReceived(const IPC::Message& msg); | 33 bool OnMessageReceived(const IPC::Message& msg); |
| 36 | 34 |
| 37 // WebKit::WebGeolocationService. | 35 // WebKit::WebGeolocationService. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 56 void OnGeolocationPositionUpdated(const Geoposition& geoposition); | 54 void OnGeolocationPositionUpdated(const Geoposition& geoposition); |
| 57 | 55 |
| 58 RenderView* render_view_; | 56 RenderView* render_view_; |
| 59 | 57 |
| 60 // The geolocation services attached to this dispatcher. | 58 // The geolocation services attached to this dispatcher. |
| 61 IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; | 59 IDMap<WebKit::WebGeolocationServiceBridge> bridges_map_; |
| 62 | 60 |
| 63 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherOld); | 61 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherOld); |
| 64 }; | 62 }; |
| 65 | 63 |
| 66 #endif // ENABLE_CLIENT_BASED_GEOLOCATION | |
| 67 | |
| 68 #endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ | 64 #endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_OLD_H_ |
| OLD | NEW |