| 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 (C) 2009 Torch Mobile, Inc. | 3 * Copyright (C) 2009 Torch Mobile, Inc. |
| 4 * Copyright 2010, The Android Open Source Project | 4 * Copyright 2010, The Android Open Source Project |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 { | 235 { |
| 236 RefPtr<Geolocation> geolocation = adoptRef(new Geolocation(context)); | 236 RefPtr<Geolocation> geolocation = adoptRef(new Geolocation(context)); |
| 237 geolocation->suspendIfNeeded(); | 237 geolocation->suspendIfNeeded(); |
| 238 return geolocation.release(); | 238 return geolocation.release(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 Geolocation::Geolocation(ScriptExecutionContext* context) | 241 Geolocation::Geolocation(ScriptExecutionContext* context) |
| 242 : ActiveDOMObject(context) | 242 : ActiveDOMObject(context) |
| 243 , m_allowGeolocation(Unknown) | 243 , m_allowGeolocation(Unknown) |
| 244 { | 244 { |
| 245 ScriptWrappable::init(this); |
| 245 } | 246 } |
| 246 | 247 |
| 247 Geolocation::~Geolocation() | 248 Geolocation::~Geolocation() |
| 248 { | 249 { |
| 249 ASSERT(m_allowGeolocation != InProgress); | 250 ASSERT(m_allowGeolocation != InProgress); |
| 250 } | 251 } |
| 251 | 252 |
| 252 Document* Geolocation::document() const | 253 Document* Geolocation::document() const |
| 253 { | 254 { |
| 254 return toDocument(scriptExecutionContext()); | 255 return toDocument(scriptExecutionContext()); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 if (startUpdating(notifier)) | 671 if (startUpdating(notifier)) |
| 671 notifier->startTimerIfNeeded(); | 672 notifier->startTimerIfNeeded(); |
| 672 else | 673 else |
| 673 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); | 674 notifier->setFatalError(PositionError::create(PositionError::POS
ITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); |
| 674 } else | 675 } else |
| 675 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); | 676 notifier->setFatalError(PositionError::create(PositionError::PERMISS
ION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); |
| 676 } | 677 } |
| 677 } | 678 } |
| 678 | 679 |
| 679 } // namespace WebCore | 680 } // namespace WebCore |
| OLD | NEW |