Changeset 63742 in webkit
- Timestamp:
- Jul 20, 2010 7:24:47 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r63721 r63742 1 2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Steve Block. 4 5 Need to be able to configure Geolocation policy regarding user permissions 6 https://bugs.webkit.org/show_bug.cgi?id=42068 7 8 If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy 9 by default 10 11 * wtf/Platform.h: 12 1 13 2010-07-19 Dirk Schulze <krit@webkit.org> 2 14 -
trunk/JavaScriptCore/wtf/Platform.h
r63348 r63742 1117 1117 #endif 1118 1118 1119 /* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location. 1120 Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy. 1121 pre-emptive permission policy is enabled by default for all client-based implementations. */ 1122 #if ENABLE(CLIENT_BASED_GEOLOCATION) 1123 #define WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 1124 #endif 1125 1119 1126 #endif /* WTF_Platform_h */ -
trunk/WebCore/ChangeLog
r63741 r63742 1 2010-07-20 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Steve Block. 4 5 Need to be able to configure Geolocation policy regarding user permissions 6 https://bugs.webkit.org/show_bug.cgi?id=42068 7 8 Introducing new USE() flag PREEMPT_GEOLOCATION_PREMISSION using which 9 acquires user permission first before starting location service 10 11 This change does not introduce any change in behavior for any platform. So there are no new tests 12 added. 13 14 * WebCore.pro: 15 * page/Geolocation.cpp: 16 (WebCore::Geolocation::startRequest): 17 (WebCore::Geolocation::setIsAllowed): 18 (WebCore::Geolocation::startUpdating): 19 * page/Geolocation.h: 20 1 21 2010-07-20 Alexander Pavlov <apavlov@chromium.org> 2 22 -
trunk/WebCore/WebCore.pro
r63735 r63742 2708 2708 2709 2709 contains(DEFINES, ENABLE_GEOLOCATION=1) { 2710 # if geolocation is enabled, enable pre-request for permission policy 2711 DEFINES += WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 2712 2710 2713 HEADERS += \ 2711 2714 platform/qt/GeolocationServiceQt.h -
trunk/WebCore/page/Geolocation.cpp
r60441 r63742 280 280 notifier->setUseCachedPosition(); 281 281 else if (notifier->hasZeroTimeout() || startUpdating(notifier.get())) { 282 #if ENABLE(CLIENT_BASED_GEOLOCATION)282 #if USE(PREEMPT_GEOLOCATION_PERMISSION) 283 283 // Only start timer if we're not waiting for user permission. 284 284 if (!m_startRequestPermissionNotifier) … … 401 401 m_allowGeolocation = allowed ? Yes : No; 402 402 403 #if ENABLE(CLIENT_BASED_GEOLOCATION)403 #if USE(PREEMPT_GEOLOCATION_PERMISSION) 404 404 if (m_startRequestPermissionNotifier) { 405 405 if (isAllowed()) { … … 407 407 m_startRequestPermissionNotifier->startTimerIfNeeded(); 408 408 m_startRequestPermissionNotifier = 0; 409 #if ENABLE(CLIENT_BASED_GEOLOCATION) 409 410 if (!m_frame) 410 411 return; … … 413 414 return; 414 415 page->geolocationController()->addObserver(this); 416 #else 417 // TODO: Handle startUpdate() for non-client based implementations using pre-emptive policy 418 #endif 415 419 } else { 416 420 m_startRequestPermissionNotifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage)); … … 613 617 bool Geolocation::startUpdating(GeoNotifier* notifier) 614 618 { 615 #if ENABLE(CLIENT_BASED_GEOLOCATION) 616 // FIXME: Pass options to client. 617 619 #if USE(PREEMPT_GEOLOCATION_PERMISSION) 618 620 if (!isAllowed()) { 619 621 m_startRequestPermissionNotifier = notifier; … … 621 623 return true; 622 624 } 623 625 #endif 626 627 #if ENABLE(CLIENT_BASED_GEOLOCATION) 624 628 if (!m_frame) 625 629 return false; … … 629 633 return false; 630 634 635 // FIXME: Pass options to client. 631 636 page->geolocationController()->addObserver(this); 632 637 return true; -
trunk/WebCore/page/Geolocation.h
r60488 r63742 166 166 #if !ENABLE(CLIENT_BASED_GEOLOCATION) 167 167 OwnPtr<GeolocationService> m_service; 168 #else 168 #endif 169 #if USE(PREEMPT_GEOLOCATION_PERMISSION) 169 170 RefPtr<GeoNotifier> m_startRequestPermissionNotifier; 170 171 #endif
Note: See TracChangeset
for help on using the changeset viewer.