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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context.cc

Issue 6597044: Revert 76228 - Move core pieces of geolocation from chrome to content.This is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/geolocation/geolocation_permission_context.cc
===================================================================
--- chrome/browser/geolocation/geolocation_permission_context.cc (revision 76230)
+++ chrome/browser/geolocation/geolocation_permission_context.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/geolocation/geolocation_permission_context.h"
+#include "chrome/browser/geolocation/geolocation_permission_context.h"
#include <functional>
#include <string>
@@ -12,10 +12,15 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
+#include "chrome/browser/geolocation/geolocation_provider.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/browser/renderer_host/render_view_host.h"
+#include "chrome/browser/renderer_host/render_view_host_notification_task.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_registrar.h"
@@ -23,10 +28,6 @@
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/geolocation/geolocation_provider.h"
-#include "content/browser/renderer_host/render_process_host.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
@@ -594,12 +595,9 @@
allowed);
}
- RenderViewHost* r = RenderViewHost::FromID(render_process_id, render_view_id);
- if (r) {
- r->Send(new ViewMsg_Geolocation_PermissionSet(
- render_view_id, bridge_id, allowed));
- }
-
+ CallRenderViewHost(render_process_id, render_view_id, &RenderViewHost::Send,
+ new ViewMsg_Geolocation_PermissionSet(render_view_id, bridge_id,
+ allowed));
if (allowed) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, NewRunnableMethod(
this, &GeolocationPermissionContext::NotifyArbitratorPermissionGranted,

Powered by Google App Engine
This is Rietveld 408576698