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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/geolocation_dispatcher.h
diff --git a/chrome/renderer/geolocation_dispatcher.h b/chrome/renderer/geolocation_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..696c9dd1746e7120d282b2c7cdaff5a322fe162d
--- /dev/null
+++ b/chrome/renderer/geolocation_dispatcher.h
@@ -0,0 +1,70 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
bulach 2010/12/07 11:18:42 \n
+#ifndef CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_
+#define CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_
+#pragma once
+
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClient.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationController.h"
+#include "base/scoped_ptr.h"
joth 2010/12/07 10:24:51 base before third_party
+
+class RenderView;
+struct Geoposition;
+
+namespace WebKit {
+class WebGeolocationPermissionRequest;
+class WebGeolocationPermissionRequestContainer;
+class WebGeolocationPosition;
+class WebSecurityOrigin;
+class WebGeolocationController;
joth 2010/12/07 10:24:51 alpha order
+}
+
+namespace IPC {
+class Message;
+};
joth 2010/12/07 10:24:51 nit: no ;
+
+// GeolocationDispatcher is a delegate for Geolocation messages used by
+// WebKit.
+// 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.
+
joth 2010/12/07 10:24:51 nit: remove \n
+class GeolocationDispatcher : public WebKit::WebGeolocationClient {
+ public:
+ explicit GeolocationDispatcher(RenderView*);
joth 2010/12/07 10:24:51 In chrome we do put the parameter names in method
+ virtual ~GeolocationDispatcher();
+
+ // IPC
+ bool OnMessageReceived(const IPC::Message&);
+
+ // WebGeolocationClient
+ virtual void geolocationDestroyed();
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void setEnableHighAccuracy(bool);
+ virtual void setController(const WebKit::WebGeolocationController&);
+ virtual bool lastPosition(WebKit::WebGeolocationPosition&);
+ virtual void requestPermission(
+ const WebKit::WebGeolocationPermissionRequest&);
+ virtual void cancelPermissionRequest(
+ const WebKit::WebGeolocationPermissionRequest&);
+
+ private:
+ RenderView* render_view_;
joth 2010/12/07 10:24:51 comment ownership
joth 2010/12/08 10:47:40 ping
+ WebKit::WebGeolocationController controller_;
+
+ // Permission for using geolocation has been set.
+ void OnGeolocationPermissionSet(int bridge_id, bool is_allowed);
+
+ // We have an updated geolocation position or error code.
+ void OnGeolocationPositionUpdated(const Geoposition& geoposition);
joth 2010/12/07 10:24:51 put all methods before member data within each sec
+
+ scoped_ptr<WebKit::WebGeolocationPermissionRequestContainer>
+ pending_permissions_;
+ bool enable_high_accuracy_;
+ bool updating_;
+};
+
+#endif // ENABLE_CLIENT_BASED_GEOLOCATION
bulach 2010/12/07 11:18:42 \n
+#endif // CHROME_RENDERER_GEOLOCATION_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698