| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #if !defined(ENABLE_CLIENT_BASED_GEOLOCATION) | 5 #if !defined(ENABLE_CLIENT_BASED_GEOLOCATION) |
| 6 #include "chrome/renderer/geolocation_dispatcher_old.h" | 6 #include "chrome/renderer/geolocation_dispatcher_old.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/common/chrome_switches.h" | |
| 9 #include "chrome/renderer/render_view.h" | 8 #include "chrome/renderer/render_view.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebCString.h" |
| 11 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
| 12 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationServiceBridge.
h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebGeolocationServiceBridge.
h" |
| 13 | 12 |
| 14 using WebKit::WebFrame; | 13 using WebKit::WebFrame; |
| 15 | 14 |
| 16 GeolocationDispatcherOld::GeolocationDispatcherOld(RenderView* render_view) | 15 GeolocationDispatcherOld::GeolocationDispatcherOld(RenderView* render_view) |
| 17 : render_view_(render_view) { | 16 : render_view_(render_view) { |
| 18 render_view_->Send(new ViewHostMsg_Geolocation_RegisterDispatcher( | 17 render_view_->Send(new ViewHostMsg_Geolocation_RegisterDispatcher( |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 geoposition.is_valid_heading(), geoposition.heading, | 105 geoposition.is_valid_heading(), geoposition.heading, |
| 107 geoposition.is_valid_speed(), geoposition.speed, | 106 geoposition.is_valid_speed(), geoposition.speed, |
| 108 static_cast<int64>(geoposition.timestamp.ToDoubleT() * 1000)); | 107 static_cast<int64>(geoposition.timestamp.ToDoubleT() * 1000)); |
| 109 } else { | 108 } else { |
| 110 it.GetCurrentValue()->setLastError( | 109 it.GetCurrentValue()->setLastError( |
| 111 geoposition.error_code, | 110 geoposition.error_code, |
| 112 WebKit::WebString::fromUTF8(geoposition.error_message)); | 111 WebKit::WebString::fromUTF8(geoposition.error_message)); |
| 113 } | 112 } |
| 114 } | 113 } |
| 115 } | 114 } |
| 116 #endif // !ENABLE_CLIENT_BASED_GEOLOCATION | 115 #endif // !ENABLE_CLIENT_BASED_GEOLOCATION |
| OLD | NEW |