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

Unified Diff: chrome/renderer/geolocation_dispatcher.cc

Issue 6151011: Introduce RenderView::Observer interface so that RenderView doesn't have to k... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/renderer/geolocation_dispatcher.h ('k') | chrome/renderer/notification_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/geolocation_dispatcher.cc
===================================================================
--- chrome/renderer/geolocation_dispatcher.cc (revision 71253)
+++ chrome/renderer/geolocation_dispatcher.cc (working copy)
@@ -4,8 +4,7 @@
#include "chrome/renderer/geolocation_dispatcher.h"
-#include "chrome/renderer/render_view.h"
-#include "ipc/ipc_message.h"
+#include "chrome/common/render_messages.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationPermissionRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClient.h"
@@ -16,7 +15,7 @@
using namespace WebKit;
GeolocationDispatcher::GeolocationDispatcher(RenderView* render_view)
- : render_view_(render_view),
+ : RenderViewObserver(render_view),
pending_permissions_(new WebGeolocationPermissionRequestManager()),
enable_high_accuracy_(false),
updating_(false) {
@@ -43,14 +42,13 @@
void GeolocationDispatcher::startUpdating() {
GURL url;
- render_view_->Send(new ViewHostMsg_Geolocation_StartUpdating(
- render_view_->routing_id(), url, enable_high_accuracy_));
+ Send(new ViewHostMsg_Geolocation_StartUpdating(
+ routing_id(), url, enable_high_accuracy_));
updating_ = true;
}
void GeolocationDispatcher::stopUpdating() {
- render_view_->Send(new ViewHostMsg_Geolocation_StopUpdating(
- render_view_->routing_id()));
+ Send(new ViewHostMsg_Geolocation_StopUpdating(routing_id()));
updating_ = false;
}
@@ -85,8 +83,8 @@
const WebGeolocationPermissionRequest& permissionRequest) {
int bridge_id = pending_permissions_->add(permissionRequest);
string16 origin = permissionRequest.securityOrigin().toString();
- render_view_->Send(new ViewHostMsg_Geolocation_RequestPermission(
- render_view_->routing_id(), bridge_id, GURL(origin)));
+ Send(new ViewHostMsg_Geolocation_RequestPermission(
+ routing_id(), bridge_id, GURL(origin)));
}
// TODO(jknotten): Change the messages to use a security origin, so no
@@ -97,8 +95,8 @@
if (!pending_permissions_->remove(permissionRequest, bridge_id))
return;
string16 origin = permissionRequest.securityOrigin().toString();
- render_view_->Send(new ViewHostMsg_Geolocation_CancelPermissionRequest(
- render_view_->routing_id(), bridge_id, GURL(origin)));
+ Send(new ViewHostMsg_Geolocation_CancelPermissionRequest(
+ routing_id(), bridge_id, GURL(origin)));
}
// Permission for using geolocation has been set.
Property changes on: chrome\renderer\geolocation_dispatcher.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/renderer/geolocation_dispatcher.h ('k') | chrome/renderer/notification_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698