Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Side by Side Diff: chrome/renderer/geolocation_dispatcher.h

Issue 5612005: Client-based geolocation support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
bulach 2010/12/07 11:18:42 \n
4 #ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_
5 #define CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_
6 #pragma once
7
8 #if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
9
10 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClient.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationController.h"
12 #include "base/scoped_ptr.h"
joth 2010/12/07 10:24:51 base before third_party
13
14 class RenderView;
15 struct Geoposition;
16
17 namespace WebKit {
18 class WebGeolocationPermissionRequest;
19 class WebGeolocationPermissionRequestContainer;
20 class WebGeolocationPosition;
21 class WebSecurityOrigin;
22 class WebGeolocationController;
joth 2010/12/07 10:24:51 alpha order
23 }
24
25 namespace IPC {
26 class Message;
27 };
joth 2010/12/07 10:24:51 nit: no ;
28
29 // GeolocationDispatcher is a delegate for Geolocation messages used by
30 // WebKit.
31 // It's the complement of GeolocationDispatcherOld (owned by RenderViewHost).
joth 2010/12/07 10:24:51 isn't this the complement of GeolocationDispatcher
joth 2010/12/08 10:47:40 ping
John Knottenbelt 2010/12/08 12:28:34 Done.
32
joth 2010/12/07 10:24:51 nit: remove \n
33 class GeolocationDispatcher : public WebKit::WebGeolocationClient {
34 public:
35 explicit GeolocationDispatcher(RenderView*);
joth 2010/12/07 10:24:51 In chrome we do put the parameter names in method
36 virtual ~GeolocationDispatcher();
37
38 // IPC
39 bool OnMessageReceived(const IPC::Message&);
40
41 // WebGeolocationClient
42 virtual void geolocationDestroyed();
43 virtual void startUpdating();
44 virtual void stopUpdating();
45 virtual void setEnableHighAccuracy(bool);
46 virtual void setController(const WebKit::WebGeolocationController&);
47 virtual bool lastPosition(WebKit::WebGeolocationPosition&);
48 virtual void requestPermission(
49 const WebKit::WebGeolocationPermissionRequest&);
50 virtual void cancelPermissionRequest(
51 const WebKit::WebGeolocationPermissionRequest&);
52
53 private:
54 RenderView* render_view_;
joth 2010/12/07 10:24:51 comment ownership
joth 2010/12/08 10:47:40 ping
55 WebKit::WebGeolocationController controller_;
56
57 // Permission for using geolocation has been set.
58 void OnGeolocationPermissionSet(int bridge_id, bool is_allowed);
59
60 // We have an updated geolocation position or error code.
61 void OnGeolocationPositionUpdated(const Geoposition& geoposition);
joth 2010/12/07 10:24:51 put all methods before member data within each sec
62
63 scoped_ptr<WebKit::WebGeolocationPermissionRequestContainer>
64 pending_permissions_;
65 bool enable_high_accuracy_;
66 bool updating_;
67 };
68
69 #endif // ENABLE_CLIENT_BASED_GEOLOCATION
bulach 2010/12/07 11:18:42 \n
70 #endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698