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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context_extensions.cc

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapping to address InfoBar currying callback case Created 6 years, 4 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
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 #include "chrome/browser/geolocation/geolocation_permission_context_extensions.h " 5 #include "chrome/browser/geolocation/geolocation_permission_context_extensions.h "
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 8
9 #if defined(ENABLE_EXTENSIONS) 9 #if defined(ENABLE_EXTENSIONS)
10 #include "chrome/browser/content_settings/permission_request_id.h" 10 #include "chrome/browser/content_settings/permission_request_id.h"
(...skipping 17 matching lines...) Expand all
28 GeolocationPermissionContextExtensions:: 28 GeolocationPermissionContextExtensions::
29 ~GeolocationPermissionContextExtensions() { 29 ~GeolocationPermissionContextExtensions() {
30 } 30 }
31 31
32 bool GeolocationPermissionContextExtensions::RequestPermission( 32 bool GeolocationPermissionContextExtensions::RequestPermission(
33 content::WebContents* web_contents, 33 content::WebContents* web_contents,
34 const PermissionRequestID& request_id, 34 const PermissionRequestID& request_id,
35 int bridge_id, 35 int bridge_id,
36 const GURL& requesting_frame, 36 const GURL& requesting_frame,
37 bool user_gesture, 37 bool user_gesture,
38 base::Callback<void(bool)> callback, 38 base::Callback<void(int, bool)> callback,
39 bool* permission_set, 39 bool* permission_set,
40 bool* new_permission) { 40 bool* new_permission) {
41 #if defined(ENABLE_EXTENSIONS) 41 #if defined(ENABLE_EXTENSIONS)
42 GURL requesting_frame_origin = requesting_frame.GetOrigin(); 42 GURL requesting_frame_origin = requesting_frame.GetOrigin();
43 43
44 WebViewPermissionHelper* web_view_permission_helper = 44 WebViewPermissionHelper* web_view_permission_helper =
45 WebViewPermissionHelper::FromWebContents(web_contents); 45 WebViewPermissionHelper::FromWebContents(web_contents);
46 if (web_view_permission_helper) { 46 if (web_view_permission_helper) {
47 web_view_permission_helper->RequestGeolocationPermission( 47 web_view_permission_helper->RequestGeolocationPermission(
48 bridge_id, requesting_frame, user_gesture, callback); 48 bridge_id, requesting_frame, user_gesture, callback);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 WebViewPermissionHelper* web_view_permission_helper = 93 WebViewPermissionHelper* web_view_permission_helper =
94 web_contents ? WebViewPermissionHelper::FromWebContents(web_contents) 94 web_contents ? WebViewPermissionHelper::FromWebContents(web_contents)
95 : NULL; 95 : NULL;
96 if (web_view_permission_helper) { 96 if (web_view_permission_helper) {
97 web_view_permission_helper->CancelGeolocationPermissionRequest(bridge_id); 97 web_view_permission_helper->CancelGeolocationPermissionRequest(bridge_id);
98 return true; 98 return true;
99 } 99 }
100 #endif // defined(ENABLE_EXTENSIONS) 100 #endif // defined(ENABLE_EXTENSIONS)
101 return false; 101 return false;
102 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698