| Index: content/browser/geolocation/geolocation.cc
|
| ===================================================================
|
| --- content/browser/geolocation/geolocation.cc (revision 163741)
|
| +++ content/browser/geolocation/geolocation.cc (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/message_loop_proxy.h"
|
| +#include "base/stringprintf.h"
|
| #include "content/browser/geolocation/geolocation_provider.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/common/geoposition.h"
|
| @@ -51,6 +52,37 @@
|
|
|
| } // namespace
|
|
|
| +
|
| +// GeolocationPermissionRequestID ---------------------------------------------
|
| +
|
| +GeolocationPermissionRequestID::GeolocationPermissionRequestID(
|
| + int render_process_id,
|
| + int render_view_id,
|
| + int bridge_id)
|
| + : render_process_id(render_process_id),
|
| + render_view_id(render_view_id),
|
| + bridge_id(bridge_id) {
|
| +}
|
| +
|
| +bool GeolocationPermissionRequestID::Equals(
|
| + const GeolocationPermissionRequestID& other) const {
|
| + return IsForSameTabAs(other) && (bridge_id == other.bridge_id);
|
| +}
|
| +
|
| +bool GeolocationPermissionRequestID::IsForSameTabAs(
|
| + const GeolocationPermissionRequestID& other) const {
|
| + return (render_process_id == other.render_process_id) &&
|
| + (render_view_id == other.render_view_id);
|
| +}
|
| +
|
| +std::string GeolocationPermissionRequestID::ToString() const {
|
| + return base::StringPrintf("%d,%d,%d", render_process_id, render_view_id,
|
| + bridge_id);
|
| +}
|
| +
|
| +
|
| +// ----------------------------------------------------------------------------
|
| +
|
| void OverrideLocationForTesting(
|
| const Geoposition& position,
|
| const base::Closure& completion_callback) {
|
|
|