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

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

Issue 185813004: [Geolocation] Attach user gesture indicator to permission request call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: plumb through Created 6 years, 9 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 (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 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro id.h" 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_andro id.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/android/google_location_settings_helper.h" 8 #include "chrome/browser/android/google_location_settings_helper.h"
9 #include "chrome/browser/content_settings/permission_request_id.h" 9 #include "chrome/browser/content_settings/permission_request_id.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // This method is executed from the BlockingPool, post the result 79 // This method is executed from the BlockingPool, post the result
80 // back to the UI thread. 80 // back to the UI thread.
81 content::BrowserThread::PostTask( 81 content::BrowserThread::PostTask(
82 content::BrowserThread::UI, FROM_HERE, ui_closure); 82 content::BrowserThread::UI, FROM_HERE, ui_closure);
83 } 83 }
84 84
85 void ChromeGeolocationPermissionContextAndroid::DecidePermission( 85 void ChromeGeolocationPermissionContextAndroid::DecidePermission(
86 content::WebContents* web_contents, 86 content::WebContents* web_contents,
87 const PermissionRequestID& id, 87 const PermissionRequestID& id,
88 const GURL& requesting_frame, 88 const GURL& requesting_frame,
89 bool user_gesture,
89 const GURL& embedder, 90 const GURL& embedder,
90 const std::string& accept_button_label, 91 const std::string& accept_button_label,
91 base::Callback<void(bool)> callback) { 92 base::Callback<void(bool)> callback) {
92 93
93 // Called on the UI thread. However, do the work on a separate thread 94 // Called on the UI thread. However, do the work on a separate thread
94 // to avoid strict mode violation. 95 // to avoid strict mode violation.
95 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 96 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
96 content::BrowserThread::PostBlockingPoolTask(FROM_HERE, 97 content::BrowserThread::PostBlockingPoolTask(FROM_HERE,
97 base::Bind( 98 base::Bind(
98 &ChromeGeolocationPermissionContextAndroid::CheckMasterLocation, 99 &ChromeGeolocationPermissionContextAndroid::CheckMasterLocation,
(...skipping 12 matching lines...) Expand all
111 if (allowed && 112 if (allowed &&
112 !google_location_settings_helper_->IsGoogleAppsLocationSettingEnabled()) { 113 !google_location_settings_helper_->IsGoogleAppsLocationSettingEnabled()) {
113 QueueController()->CreateInfoBarRequest(id, requesting_frame, embedder, "", 114 QueueController()->CreateInfoBarRequest(id, requesting_frame, embedder, "",
114 callback); 115 callback);
115 return; 116 return;
116 } 117 }
117 118
118 ChromeGeolocationPermissionContext::PermissionDecided( 119 ChromeGeolocationPermissionContext::PermissionDecided(
119 id, requesting_frame, embedder, callback, allowed); 120 id, requesting_frame, embedder, callback, allowed);
120 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698