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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 28c9c1344e19ecbbe1899f7b6b5a2b13610954a6..c9edb552ce80079361bc4a3a87e28c4c00ca7968 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -41,6 +41,8 @@
#include "chrome/browser/extensions/extension_webkit_preferences.h"
#include "chrome/browser/extensions/suggest_permission_util.h"
#include "chrome/browser/geolocation/chrome_access_token_store.h"
+#include "chrome/browser/geolocation/geolocation_permission_context.h"
+#include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/media/cast_transport_host_filter.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
@@ -2142,6 +2144,20 @@ void ChromeContentBrowserClient::ShowDesktopNotification(
#endif
}
+void ChromeContentBrowserClient::RequestGeolocationPermission(
+ content::WebContents* web_contents,
+ int bridge_id,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ base::Callback<void(bool)> result_callback,
+ base::Closure* cancel_callback) {
+ GeolocationPermissionContextFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()))->
+ RequestGeolocationPermission(web_contents, bridge_id,
+ requesting_frame, user_gesture,
+ result_callback, cancel_callback);
+}
+
bool ChromeContentBrowserClient::CanCreateWindow(
const GURL& opener_url,
const GURL& opener_top_level_frame_url,
@@ -2709,6 +2725,11 @@ void ChromeContentBrowserClient::PreSpawnRenderer(
}
#endif
+content::DevToolsManagerDelegate*
+ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
+ return new ChromeDevToolsManagerDelegate();
+}
+
bool ChromeContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle(
content::BrowserContext* browser_context,
const GURL& url) {
@@ -2748,11 +2769,6 @@ bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs() {
#endif
}
-content::DevToolsManagerDelegate*
-ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
- return new ChromeDevToolsManagerDelegate();
-}
-
net::CookieStore*
ChromeContentBrowserClient::OverrideCookieStoreForRenderProcess(
int render_process_id) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/geolocation/chrome_geolocation_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698