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

Side by Side Diff: content/browser/geolocation/geolocation_dispatcher_host.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: joth comments 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_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
7 7
8 #include "content/public/browser/browser_message_filter.h" 8 #include "content/public/browser/browser_message_filter.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 class GeolocationPermissionContext; 12 class GeolocationPermissionContext;
13 13
14 // GeolocationDispatcherHost is a browser filter for Geolocation messages. 14 // GeolocationDispatcherHost is a browser filter for Geolocation messages.
15 // It's the complement of GeolocationDispatcher (owned by RenderView). 15 // It's the complement of GeolocationDispatcher (owned by RenderView).
16 class GeolocationDispatcherHost : public BrowserMessageFilter { 16 class GeolocationDispatcherHost : public BrowserMessageFilter {
17 public: 17 public:
18 static GeolocationDispatcherHost* New( 18 static GeolocationDispatcherHost* New(
19 int render_process_id, 19 int render_process_id,
20 GeolocationPermissionContext* geolocation_permission_context); 20 GeolocationPermissionContext* geolocation_permission_context);
21 21
22 // Pause or resumes geolocation for the given |render_view_id|. Should
23 // be called on the IO thread. Resuming when nothing is paused is a no-op.
24 virtual void PauseOrResume(int render_view_id, bool should_pause) = 0;
25
22 protected: 26 protected:
23 GeolocationDispatcherHost(); 27 GeolocationDispatcherHost();
24 virtual ~GeolocationDispatcherHost(); 28 virtual ~GeolocationDispatcherHost();
25 29
26 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost); 30 DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
27 }; 31 };
28 32
29 } // namespace content 33 } // namespace content
30 34
31 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_ 35 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698