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

Side by Side Diff: content/public/browser/geolocation_permission_context.h

Issue 330143002: Simplify geolocation permission request in the Content API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months 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) 2012 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.
4
5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
7
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
11
12 class GURL;
13
14 namespace content {
15 class WebContents;
16
17 // GeolocationPermissionContext must be implemented by the embedder, to provide
18 // the policy and logic for the Geolocation permissions flow.
19 // This includes both prompting the user and persisting results, as required.
20 class CONTENT_EXPORT GeolocationPermissionContext
21 : public base::RefCountedThreadSafe<GeolocationPermissionContext> {
22 public:
23 // The renderer is requesting permission to use Geolocation.
24 // When the answer to a permission request has been determined, |callback|
25 // should be called with the result.
26 virtual void RequestGeolocationPermission(
27 WebContents* web_contents,
28 int bridge_id,
29 const GURL& requesting_frame,
30 bool user_gesture,
31 base::Callback<void(bool)> callback) = 0;
32
33 // The renderer is cancelling a pending permission request.
34 virtual void CancelGeolocationPermissionRequest(
35 WebContents* web_contents,
36 int bridge_id,
37 const GURL& requesting_frame) = 0;
38
39 protected:
40 virtual ~GeolocationPermissionContext() {}
41
42 private:
43 friend class base::RefCountedThreadSafe<GeolocationPermissionContext>;
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698