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