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

Side by Side Diff: content/browser/geolocation/geolocation_dispatcher_host.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 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 "content/browser/geolocation/geolocation_dispatcher_host.h" 5 #include "content/browser/geolocation/geolocation_dispatcher_host.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 138
139 void GeolocationDispatcherHostImpl::OnRequestPermission( 139 void GeolocationDispatcherHostImpl::OnRequestPermission(
140 int render_view_id, 140 int render_view_id,
141 int bridge_id, 141 int bridge_id,
142 const GURL& requesting_frame) { 142 const GURL& requesting_frame) {
143 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 143 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
144 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" 144 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":"
145 << render_view_id << ":" << bridge_id; 145 << render_view_id << ":" << bridge_id;
146 if (geolocation_permission_context_) { 146 if (geolocation_permission_context_.get()) {
147 geolocation_permission_context_->RequestGeolocationPermission( 147 geolocation_permission_context_->RequestGeolocationPermission(
148 render_process_id_, render_view_id, bridge_id, requesting_frame, 148 render_process_id_,
149 base::Bind(&SendGeolocationPermissionResponse, render_process_id_, 149 render_view_id,
150 render_view_id, bridge_id)); 150 bridge_id,
151 requesting_frame,
152 base::Bind(&SendGeolocationPermissionResponse,
153 render_process_id_,
154 render_view_id,
155 bridge_id));
151 } else { 156 } else {
152 BrowserThread::PostTask( 157 BrowserThread::PostTask(
153 BrowserThread::UI, FROM_HERE, 158 BrowserThread::UI, FROM_HERE,
154 base::Bind(&SendGeolocationPermissionResponse, render_process_id_, 159 base::Bind(&SendGeolocationPermissionResponse, render_process_id_,
155 render_view_id, bridge_id, true)); 160 render_view_id, bridge_id, true));
156 } 161 }
157 } 162 }
158 163
159 void GeolocationDispatcherHostImpl::OnCancelPermissionRequest( 164 void GeolocationDispatcherHostImpl::OnCancelPermissionRequest(
160 int render_view_id, 165 int render_view_id,
161 int bridge_id, 166 int bridge_id,
162 const GURL& requesting_frame) { 167 const GURL& requesting_frame) {
163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 168 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
164 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" 169 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":"
165 << render_view_id << ":" << bridge_id; 170 << render_view_id << ":" << bridge_id;
166 if (geolocation_permission_context_) { 171 if (geolocation_permission_context_.get()) {
167 geolocation_permission_context_->CancelGeolocationPermissionRequest( 172 geolocation_permission_context_->CancelGeolocationPermissionRequest(
168 render_process_id_, render_view_id, bridge_id, requesting_frame); 173 render_process_id_, render_view_id, bridge_id, requesting_frame);
169 } 174 }
170 } 175 }
171 176
172 void GeolocationDispatcherHostImpl::OnStartUpdating( 177 void GeolocationDispatcherHostImpl::OnStartUpdating(
173 int render_view_id, 178 int render_view_id,
174 const GURL& requesting_frame, 179 const GURL& requesting_frame,
175 bool enable_high_accuracy) { 180 bool enable_high_accuracy) {
176 // StartUpdating() can be invoked as a result of high-accuracy mode 181 // StartUpdating() can be invoked as a result of high-accuracy mode
177 // being enabled / disabled. No need to record the dispatcher again. 182 // being enabled / disabled. No need to record the dispatcher again.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 geolocation_permission_context); 237 geolocation_permission_context);
233 } 238 }
234 239
235 GeolocationDispatcherHost::GeolocationDispatcherHost() { 240 GeolocationDispatcherHost::GeolocationDispatcherHost() {
236 } 241 }
237 242
238 GeolocationDispatcherHost::~GeolocationDispatcherHost() { 243 GeolocationDispatcherHost::~GeolocationDispatcherHost() {
239 } 244 }
240 245
241 } // namespace content 246 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/device_data_provider.h ('k') | content/browser/geolocation/location_arbitrator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698