| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. |
| 3 * Copyright 2010, The Android Open Source Project | 3 * Copyright 2010, The Android Open Source Project |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class Document; | 42 class Document; |
| 43 class Frame; | 43 class Frame; |
| 44 class GeolocationController; | 44 class GeolocationController; |
| 45 class GeolocationError; | 45 class GeolocationError; |
| 46 class GeolocationPosition; | 46 class GeolocationPosition; |
| 47 class Page; | 47 class Page; |
| 48 class ExecutionContext; | 48 class ExecutionContext; |
| 49 | 49 |
| 50 class Geolocation FINAL : public RefCountedWillBeGarbageCollectedFinalized<Geolo
cation>, public ScriptWrappable, public ActiveDOMObject | 50 class Geolocation FINAL : public RefCountedWillBeGarbageCollectedFinalized<Geolo
cation>, public ScriptWrappable, public ActiveDOMObject |
| 51 { | 51 { |
| 52 DECLARE_GC_INFO; | |
| 53 public: | 52 public: |
| 54 static PassRefPtrWillBeRawPtr<Geolocation> create(ExecutionContext*); | 53 static PassRefPtrWillBeRawPtr<Geolocation> create(ExecutionContext*); |
| 55 virtual ~Geolocation(); | 54 virtual ~Geolocation(); |
| 56 void trace(Visitor*); | 55 void trace(Visitor*); |
| 57 | 56 |
| 58 virtual void stop() OVERRIDE; | 57 virtual void stop() OVERRIDE; |
| 59 Document* document() const; | 58 Document* document() const; |
| 60 Frame* frame() const; | 59 Frame* frame() const; |
| 61 | 60 |
| 62 // Creates a oneshot and attempts to obtain a position that meets the | 61 // Creates a oneshot and attempts to obtain a position that meets the |
| (...skipping 26 matching lines...) Expand all Loading... |
| 89 | 88 |
| 90 explicit Geolocation(ExecutionContext*); | 89 explicit Geolocation(ExecutionContext*); |
| 91 | 90 |
| 92 Page* page() const; | 91 Page* page() const; |
| 93 | 92 |
| 94 // Holds the success and error callbacks and the options that were provided | 93 // Holds the success and error callbacks and the options that were provided |
| 95 // when a oneshot or watcher were created. Also, if specified in the | 94 // when a oneshot or watcher were created. Also, if specified in the |
| 96 // options, manages a timer to limit the time to wait for the system to | 95 // options, manages a timer to limit the time to wait for the system to |
| 97 // obtain a position. | 96 // obtain a position. |
| 98 class GeoNotifier : public RefCountedWillBeGarbageCollectedFinalized<GeoNoti
fier> { | 97 class GeoNotifier : public RefCountedWillBeGarbageCollectedFinalized<GeoNoti
fier> { |
| 99 DECLARE_GC_INFO; | |
| 100 public: | 98 public: |
| 101 static PassRefPtrWillBeRawPtr<GeoNotifier> create(Geolocation* geolocati
on, PassOwnPtr<PositionCallback> positionCallback, PassOwnPtr<PositionErrorCallb
ack> positionErrorCallback, PassRefPtrWillBeRawPtr<PositionOptions> options) | 99 static PassRefPtrWillBeRawPtr<GeoNotifier> create(Geolocation* geolocati
on, PassOwnPtr<PositionCallback> positionCallback, PassOwnPtr<PositionErrorCallb
ack> positionErrorCallback, PassRefPtrWillBeRawPtr<PositionOptions> options) |
| 102 { | 100 { |
| 103 return adoptRefWillBeNoop(new GeoNotifier(geolocation, positionCallb
ack, positionErrorCallback, options)); | 101 return adoptRefWillBeNoop(new GeoNotifier(geolocation, positionCallb
ack, positionErrorCallback, options)); |
| 104 } | 102 } |
| 105 void trace(Visitor*); | 103 void trace(Visitor*); |
| 106 | 104 |
| 107 PositionOptions* options() const { return m_options.get(); }; | 105 PositionOptions* options() const { return m_options.get(); }; |
| 108 | 106 |
| 109 // Sets the given error as the fatal error if there isn't one yet. | 107 // Sets the given error as the fatal error if there isn't one yet. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 Yes, | 241 Yes, |
| 244 No | 242 No |
| 245 } m_allowGeolocation; | 243 } m_allowGeolocation; |
| 246 | 244 |
| 247 GeoNotifierSet m_requestsAwaitingCachedPosition; | 245 GeoNotifierSet m_requestsAwaitingCachedPosition; |
| 248 }; | 246 }; |
| 249 | 247 |
| 250 } // namespace WebCore | 248 } // namespace WebCore |
| 251 | 249 |
| 252 #endif // Geolocation_h | 250 #endif // Geolocation_h |
| OLD | NEW |