| OLD | NEW |
| (Empty) | |
| 1 #include "config.h" |
| 2 |
| 3 #include "ChaosGeolocation.h" |
| 4 #include "V8CustomChaosPositionCallback.h" |
| 5 #include "V8ObjectEventListener.h" |
| 6 #include "V8Proxy.h" |
| 7 #undef LOG |
| 8 #include "base/logging.h" |
| 9 |
| 10 namespace WebCore { |
| 11 |
| 12 CALLBACK_FUNC_DECL(ChaosGeolocationWatchPosition) { |
| 13 LOG(WARNING) << "watchPosition"; |
| 14 ChaosGeolocation* geolocation = V8DOMWrapper::convertToNativeObject<ChaosGeolo
cation>(V8ClassIndex::CHAOSGEOLOCATION, args.Holder()); |
| 15 V8Proxy* proxy = V8Proxy::retrieve(); |
| 16 Frame *frame = V8Proxy::retrieveFrameForCurrentContext(); |
| 17 |
| 18 RefPtr<V8CustomChaosPositionCallback> successCallback |
| 19 = V8CustomChaosPositionCallback::create(frame, args[0]); |
| 20 |
| 21 int handle = geolocation->watchPosition(successCallback); |
| 22 |
| 23 return v8::Integer::New(handle); |
| 24 } |
| 25 |
| 26 } // namespace WebCore |
| OLD | NEW |