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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_extensions.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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_EXTENSI ONS_H_ 5 #ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_
6 #define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_EXTENSI ONS_H_ 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
11 namespace content { 11 namespace content {
12 class WebContents; 12 class WebContents;
13 } 13 }
14 14
15 class GURL; 15 class GURL;
16 class PermissionRequestID; 16 class PermissionRequestID;
17 class Profile; 17 class Profile;
18 18
19 // Chrome extensions specific portions of GeolocationPermissionContext. 19 // Chrome extensions specific portions of GeolocationPermissionContext.
20 class ChromeGeolocationPermissionContextExtensions { 20 class GeolocationPermissionContextExtensions {
21 public: 21 public:
22 explicit ChromeGeolocationPermissionContextExtensions(Profile* profile); 22 explicit GeolocationPermissionContextExtensions(Profile* profile);
23 ~ChromeGeolocationPermissionContextExtensions(); 23 ~GeolocationPermissionContextExtensions();
24 24
25 // Returns true if the permission request was handled. In which case, 25 // Returns true if the permission request was handled. In which case,
26 // |permission_set| will be set to true if the permission changed, and the 26 // |permission_set| will be set to true if the permission changed, and the
27 // permission has been set to |new_permission|. 27 // permission has been set to |new_permission|.
28 bool RequestPermission(content::WebContents* web_contents, 28 bool RequestPermission(content::WebContents* web_contents,
29 const PermissionRequestID& request_id, 29 const PermissionRequestID& request_id,
30 int bridge_id, 30 int bridge_id,
31 const GURL& requesting_frame, 31 const GURL& requesting_frame,
32 bool user_gesture, 32 bool user_gesture,
33 base::Callback<void(bool)> callback, 33 base::Callback<void(bool)> callback,
34 bool* permission_set, 34 bool* permission_set,
35 bool* new_permission); 35 bool* new_permission);
36 36
37 // Returns true if the cancellation request was handled. 37 // Returns true if the cancellation request was handled.
38 bool CancelPermissionRequest(content::WebContents* web_contents, 38 bool CancelPermissionRequest(content::WebContents* web_contents,
39 int bridge_id); 39 int bridge_id);
40 40
41 private: 41 private:
42 Profile* profile_; 42 Profile* profile_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContextExtensions); 44 DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextExtensions);
45 }; 45 };
46 46
47 #endif // CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_EXTE NSIONS_H_ 47 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PERMISSION_CONTEXT_EXTENSIONS_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698