Changeset 50348 in webkit
- Timestamp:
- Oct 30, 2009 12:37:12 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50347 r50348 1 2009-10-30 John Gregg <johnnyg@google.com> 2 3 Reviewed by David Levin. 4 5 Need to turn off notifications properly at runtime 6 https://bugs.webkit.org/show_bug.cgi?id=30409 7 8 Moving the notificationsEnabled bit from NotificationCenter 9 to the new V8 RuntimeEnabledFeatures object. 10 11 Just moving a bit around, so no new tests. 12 13 * bindings/v8/RuntimeEnabledFeatures.cpp: 14 * bindings/v8/RuntimeEnabledFeatures.h: 15 (WebCore::RuntimeEnabledFeatures::setNotificationsEnabled): 16 (WebCore::RuntimeEnabledFeatures::notificationsEnabled): 17 * bindings/v8/custom/V8DOMWindowCustom.cpp: 18 (WebCore::ACCESSOR_RUNTIME_ENABLER): 19 * bindings/v8/custom/V8WorkerContextCustom.cpp: 20 (WebCore::ACCESSOR_RUNTIME_ENABLER): 21 * notifications/NotificationCenter.cpp: 22 * notifications/NotificationCenter.h: 23 1 24 2009-10-30 Dmitry Titov <dimich@chromium.org> 2 25 -
trunk/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
r50158 r50348 37 37 bool RuntimeEnabledFeatures::isLocalStorageEnabled = true; 38 38 bool RuntimeEnabledFeatures::isSessionStorageEnabled = true; 39 bool RuntimeEnabledFeatures::isNotificationsEnabled = false; 39 40 40 41 } // namespace WebCore -
trunk/WebCore/bindings/v8/RuntimeEnabledFeatures.h
r50113 r50348 46 46 static bool sessionStorageEnabled() { return isSessionStorageEnabled; } 47 47 48 static void setNotificationsEnabled(bool isEnabled) { isNotificationsEnabled = isEnabled; } 49 static bool notificationsEnabled() { return isNotificationsEnabled; } 50 48 51 private: 49 52 // Never instantiate. … … 53 56 static bool isLocalStorageEnabled; 54 57 static bool isSessionStorageEnabled; 58 static bool isNotificationsEnabled; 55 59 }; 56 60 -
trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
r50113 r50348 47 47 #include "HTMLCollection.h" 48 48 #include "MediaPlayer.h" 49 #include "NotificationCenter.h"50 49 #include "Page.h" 51 50 #include "PlatformScreen.h" … … 305 304 ACCESSOR_RUNTIME_ENABLER(DOMWindowWebkitNotifications) 306 305 { 307 return NotificationCenter::isAvailable();306 return RuntimeEnabledFeatures::notificationsEnabled(); 308 307 } 309 308 #endif -
trunk/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
r50327 r50348 35 35 #include "DOMTimer.h" 36 36 #include "ExceptionCode.h" 37 #include " NotificationCenter.h"37 #include "RuntimeEnabledFeatures.h" 38 38 #include "ScheduledAction.h" 39 39 #include "V8Binding.h" … … 50 50 ACCESSOR_RUNTIME_ENABLER(WorkerContextWebkitNotifications) 51 51 { 52 return NotificationCenter::isAvailable();52 return RuntimeEnabledFeatures::notificationsEnabled(); 53 53 } 54 54 #endif -
trunk/WebCore/notifications/NotificationCenter.cpp
r49893 r50348 41 41 namespace WebCore { 42 42 43 #if USE(V8)44 static bool notificationCenterAvailable = false;45 46 void NotificationCenter::setIsAvailable(bool available)47 {48 notificationCenterAvailable = available;49 }50 51 bool NotificationCenter::isAvailable()52 {53 return notificationCenterAvailable;54 }55 #endif56 57 43 NotificationCenter::NotificationCenter(ScriptExecutionContext* context, NotificationPresenter* presenter) 58 44 : ActiveDOMObject(context, this) -
trunk/WebCore/notifications/NotificationCenter.h
r49893 r50348 48 48 class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject { 49 49 public: 50 #if USE(V8)51 static void setIsAvailable(bool);52 static bool isAvailable();53 #endif54 50 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); } 55 51 -
trunk/WebCore/page/DOMWindow.cpp
r49214 r50348 626 626 return 0; 627 627 628 if (!page->settings()->experimentalNotificationsEnabled())629 return 0;630 631 628 NotificationPresenter* provider = page->chrome()->notificationPresenter(); 632 629 if (provider)
Note: See TracChangeset
for help on using the changeset viewer.