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

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

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wire up onPause/onResume Created 7 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/renderer/render_view_observer.h" 9 #include "content/public/renderer/render_view_observer.h"
10 #include "third_party/WebKit/public/web/WebGeolocationClient.h" 10 #include "third_party/WebKit/public/web/WebGeolocationClient.h"
(...skipping 27 matching lines...) Expand all
38 virtual void geolocationDestroyed(); 38 virtual void geolocationDestroyed();
39 virtual void startUpdating(); 39 virtual void startUpdating();
40 virtual void stopUpdating(); 40 virtual void stopUpdating();
41 virtual void setEnableHighAccuracy(bool enable_high_accuracy); 41 virtual void setEnableHighAccuracy(bool enable_high_accuracy);
42 virtual void setController(blink::WebGeolocationController* controller); 42 virtual void setController(blink::WebGeolocationController* controller);
43 virtual bool lastPosition(blink::WebGeolocationPosition& position); 43 virtual bool lastPosition(blink::WebGeolocationPosition& position);
44 virtual void requestPermission( 44 virtual void requestPermission(
45 const blink::WebGeolocationPermissionRequest& permissionRequest); 45 const blink::WebGeolocationPermissionRequest& permissionRequest);
46 virtual void cancelPermissionRequest( 46 virtual void cancelPermissionRequest(
47 const blink::WebGeolocationPermissionRequest& permissionRequest); 47 const blink::WebGeolocationPermissionRequest& permissionRequest);
48 virtual void pauseOrResume(bool should_pause);
48 49
49 // Permission for using geolocation has been set. 50 // Permission for using geolocation has been set.
50 void OnPermissionSet(int bridge_id, bool is_allowed); 51 void OnPermissionSet(int bridge_id, bool is_allowed);
51 52
52 // We have an updated geolocation position or error code. 53 // We have an updated geolocation position or error code.
53 void OnPositionUpdated(const content::Geoposition& geoposition); 54 void OnPositionUpdated(const content::Geoposition& geoposition);
54 55
55 // The controller_ is valid for the lifetime of the underlying 56 // The controller_ is valid for the lifetime of the underlying
56 // WebCore::GeolocationController. geolocationDestroyed() is 57 // WebCore::GeolocationController. geolocationDestroyed() is
57 // invoked when the underlying object is destroyed. 58 // invoked when the underlying object is destroyed.
58 scoped_ptr< blink::WebGeolocationController> controller_; 59 scoped_ptr< blink::WebGeolocationController> controller_;
59 60
60 scoped_ptr<blink::WebGeolocationPermissionRequestManager> 61 scoped_ptr<blink::WebGeolocationPermissionRequestManager>
61 pending_permissions_; 62 pending_permissions_;
62 bool enable_high_accuracy_; 63 bool enable_high_accuracy_;
63 bool updating_; 64 bool updating_;
64 }; 65 };
65 66
66 } // namespace content 67 } // namespace content
67 68
68 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_ 69 #endif // CONTENT_RENDERER_GEOLOCATION_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698