Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 | 53 |
| 54 // GeolocationDispatcherHost | 54 // GeolocationDispatcherHost |
| 55 virtual bool OnMessageReceived(const IPC::Message& msg, | 55 virtual bool OnMessageReceived(const IPC::Message& msg, |
| 56 bool* msg_was_ok) OVERRIDE; | 56 bool* msg_was_ok) OVERRIDE; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 virtual ~GeolocationDispatcherHostImpl(); | 59 virtual ~GeolocationDispatcherHostImpl(); |
| 60 | 60 |
| 61 void OnRequestPermission(int render_view_id, | 61 void OnRequestPermission(int render_view_id, |
| 62 int bridge_id, | 62 int bridge_id, |
| 63 const GURL& requesting_frame); | 63 const GURL& requesting_frame, |
| 64 bool user_gesture); | |
| 64 void OnCancelPermissionRequest(int render_view_id, | 65 void OnCancelPermissionRequest(int render_view_id, |
| 65 int bridge_id, | 66 int bridge_id, |
| 66 const GURL& requesting_frame); | 67 const GURL& requesting_frame); |
| 67 void OnStartUpdating(int render_view_id, | 68 void OnStartUpdating(int render_view_id, |
| 68 const GURL& requesting_frame, | 69 const GURL& requesting_frame, |
| 69 bool enable_high_accuracy); | 70 bool enable_high_accuracy); |
| 70 void OnStopUpdating(int render_view_id); | 71 void OnStopUpdating(int render_view_id); |
| 71 | 72 |
| 72 | 73 |
| 73 virtual void PauseOrResume(int render_view_id, bool should_pause) OVERRIDE; | 74 virtual void PauseOrResume(int render_view_id, bool should_pause) OVERRIDE; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 geolocation_renderers_.begin(); | 153 geolocation_renderers_.begin(); |
| 153 it != geolocation_renderers_.end(); ++it) { | 154 it != geolocation_renderers_.end(); ++it) { |
| 154 if (!(it->second.is_paused)) | 155 if (!(it->second.is_paused)) |
| 155 Send(new GeolocationMsg_PositionUpdated(it->first, geoposition)); | 156 Send(new GeolocationMsg_PositionUpdated(it->first, geoposition)); |
| 156 } | 157 } |
| 157 } | 158 } |
| 158 | 159 |
| 159 void GeolocationDispatcherHostImpl::OnRequestPermission( | 160 void GeolocationDispatcherHostImpl::OnRequestPermission( |
| 160 int render_view_id, | 161 int render_view_id, |
| 161 int bridge_id, | 162 int bridge_id, |
| 162 const GURL& requesting_frame) { | 163 const GURL& requesting_frame, |
| 164 bool user_gesture) { | |
|
jamesr
2014/03/06 21:37:43
please add a TODO() or something here indicating t
Greg Billock
2014/03/08 17:15:33
I pushed this out to the browser side and added th
| |
| 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 165 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 164 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" | 166 DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" |
| 165 << render_view_id << ":" << bridge_id; | 167 << render_view_id << ":" << bridge_id; |
| 166 if (geolocation_permission_context_.get()) { | 168 if (geolocation_permission_context_.get()) { |
| 167 geolocation_permission_context_->RequestGeolocationPermission( | 169 geolocation_permission_context_->RequestGeolocationPermission( |
| 168 render_process_id_, | 170 render_process_id_, |
| 169 render_view_id, | 171 render_view_id, |
| 170 bridge_id, | 172 bridge_id, |
| 171 requesting_frame, | 173 requesting_frame, |
| 172 base::Bind(&SendGeolocationPermissionResponse, | 174 base::Bind(&SendGeolocationPermissionResponse, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 } | 298 } |
| 297 | 299 |
| 298 GeolocationDispatcherHost::GeolocationDispatcherHost() | 300 GeolocationDispatcherHost::GeolocationDispatcherHost() |
| 299 : BrowserMessageFilter(GeolocationMsgStart) { | 301 : BrowserMessageFilter(GeolocationMsgStart) { |
| 300 } | 302 } |
| 301 | 303 |
| 302 GeolocationDispatcherHost::~GeolocationDispatcherHost() { | 304 GeolocationDispatcherHost::~GeolocationDispatcherHost() { |
| 303 } | 305 } |
| 304 | 306 |
| 305 } // namespace content | 307 } // namespace content |
| OLD | NEW |