OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 GeolocationPosition* GeolocationClientProxy::lastPosition() | 69 GeolocationPosition* GeolocationClientProxy::lastPosition() |
70 { | 70 { |
71 WebGeolocationPosition webPosition; | 71 WebGeolocationPosition webPosition; |
72 if (m_client->lastPosition(webPosition)) | 72 if (m_client->lastPosition(webPosition)) |
73 m_lastPosition = static_cast<GeolocationPosition*>(webPosition); | 73 m_lastPosition = static_cast<GeolocationPosition*>(webPosition); |
74 else | 74 else |
75 m_lastPosition.clear(); | 75 m_lastPosition.clear(); |
76 | 76 |
77 return m_lastPosition.get(); | 77 return m_lastPosition; |
78 } | 78 } |
79 | 79 |
80 void GeolocationClientProxy::requestPermission(Geolocation* geolocation) | 80 void GeolocationClientProxy::requestPermission(Geolocation* geolocation) |
81 { | 81 { |
82 m_client->requestPermission(WebGeolocationPermissionRequest(geolocation)); | 82 m_client->requestPermission(WebGeolocationPermissionRequest(geolocation)); |
83 } | 83 } |
84 | 84 |
85 void GeolocationClientProxy::cancelPermissionRequest(Geolocation* geolocation) | 85 void GeolocationClientProxy::cancelPermissionRequest(Geolocation* geolocation) |
86 { | 86 { |
87 m_client->cancelPermissionRequest(WebGeolocationPermissionRequest(geolocatio
n)); | 87 m_client->cancelPermissionRequest(WebGeolocationPermissionRequest(geolocatio
n)); |
88 } | 88 } |
89 | 89 |
90 DEFINE_TRACE(GeolocationClientProxy) | 90 DEFINE_TRACE(GeolocationClientProxy) |
91 { | 91 { |
92 visitor->trace(m_lastPosition); | 92 visitor->trace(m_lastPosition); |
93 GeolocationClient::trace(visitor); | 93 GeolocationClient::trace(visitor); |
94 } | 94 } |
95 | 95 |
96 } // namespace blink | 96 } // namespace blink |
OLD | NEW |