Changeset 53406 in webkit
- Timestamp:
- Jan 18, 2010 6:37:01 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53405 r53406 1 2010-01-18 Jonathan Dixon <joth@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Add support for enabling navigator.geolocation at runtime in the V8 bindings. 6 Adds the [EnabledAtRuntime] modifier to the navigator IDL. 7 https://bugs.webkit.org/show_bug.cgi?id=33467 8 9 * WebCore.gypi: 10 * bindings/v8/RuntimeEnabledFeatures.cpp: 11 * bindings/v8/RuntimeEnabledFeatures.h: 12 (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled): 13 (WebCore::RuntimeEnabledFeatures::geolocationEnabled): 14 * bindings/v8/custom/V8NavigatorCustom.cpp: Added. 15 (WebCore::V8Navigator::GeolocationEnabled): 16 * page/Navigator.cpp: 17 (WebCore::Navigator::geolocation): 18 * page/Navigator.idl: 19 1 20 2010-01-18 Alexander Pavlov <apavlov@chromium.org> 2 21 -
trunk/WebCore/WebCore.gypi
r53347 r53406 721 721 'bindings/v8/custom/V8NamedNodesCollection.cpp', 722 722 'bindings/v8/custom/V8NamedNodesCollection.h', 723 'bindings/v8/custom/V8NavigatorCustom.cpp', 723 724 'bindings/v8/custom/V8NodeCustom.cpp', 724 725 'bindings/v8/custom/V8NodeFilterCustom.cpp', -
trunk/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
r50534 r53406 39 39 bool RuntimeEnabledFeatures::isNotificationsEnabled = false; 40 40 bool RuntimeEnabledFeatures::isApplicationCacheEnabled = false; 41 bool RuntimeEnabledFeatures::isGeolocationEnabled = false; 41 42 42 43 } // namespace WebCore -
trunk/WebCore/bindings/v8/RuntimeEnabledFeatures.h
r50534 r53406 52 52 static bool applicationCacheEnabled() { return isApplicationCacheEnabled; } 53 53 54 static void setGeolocationEnabled(bool isEnabled) { isGeolocationEnabled = isEnabled; } 55 static bool geolocationEnabled() { return isGeolocationEnabled; } 56 54 57 private: 55 58 // Never instantiate. … … 61 64 static bool isNotificationsEnabled; 62 65 static bool isApplicationCacheEnabled; 66 static bool isGeolocationEnabled; 63 67 }; 64 68 -
trunk/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
r53405 r53406 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.3 * 2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * 4 4 * Redistribution and use in source and binary forms, with or without 5 5 * modification, are permitted provided that the following conditions are 6 6 * met: 7 * 7 * 8 8 * * Redistributions of source code must retain the above copyright 9 9 * notice, this list of conditions and the following disclaimer. … … 15 15 * contributors may be used to endorse or promote products derived from 16 16 * this software without specific prior written permission. 17 * 17 * 18 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 30 30 31 31 #include "config.h" 32 #include "V8Navigator.h" 33 32 34 #include "RuntimeEnabledFeatures.h" 33 35 34 36 namespace WebCore { 35 37 36 bool RuntimeEnabledFeatures::isDatabaseEnabled = false; 37 bool RuntimeEnabledFeatures::isLocalStorageEnabled = true; 38 bool RuntimeEnabledFeatures::isSessionStorageEnabled = true; 39 bool RuntimeEnabledFeatures::isNotificationsEnabled = false; 40 bool RuntimeEnabledFeatures::isApplicationCacheEnabled = false; 38 #if ENABLE(GEOLOCATION) 39 bool V8Navigator::GeolocationEnabled() 40 { 41 return RuntimeEnabledFeatures::geolocationEnabled(); 42 } 43 #endif 41 44 42 45 } // namespace WebCore -
trunk/WebCore/page/Navigator.idl
r52534 r53406 42 42 43 43 #if defined(ENABLE_GEOLOCATION) && ENABLE_GEOLOCATION 44 readonly attribute Geolocation geolocation;44 readonly attribute [EnabledAtRuntime] Geolocation geolocation; 45 45 #endif 46 46 -
trunk/WebKit/chromium/ChangeLog
r53389 r53406 1 2010-01-18 Jonathan Dixon <joth@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Add support for enabling navigator.geolocation at runtime in the V8 bindings. 6 Adds the [EnabledAtRuntime] modifier to the navigator IDL. 7 https://bugs.webkit.org/show_bug.cgi?id=33467 8 9 * public/WebRuntimeFeatures.h: 10 * src/WebRuntimeFeatures.cpp: 11 (WebKit::WebRuntimeFeatures::enableGeolocation): 12 (WebKit::WebRuntimeFeatures::isGeolocationEnabled): 13 1 14 2010-01-17 Kent Tamura <tkent@chromium.org> 2 15 -
trunk/WebKit/chromium/public/WebRuntimeFeatures.h
r50717 r53406 63 63 WEBKIT_API static bool isApplicationCacheEnabled(); 64 64 65 WEBKIT_API static void enableGeolocation(bool); 66 WEBKIT_API static bool isGeolocationEnabled(); 67 65 68 private: 66 69 WebRuntimeFeatures(); -
trunk/WebKit/chromium/src/WebRuntimeFeatures.cpp
r50722 r53406 152 152 } 153 153 154 void WebRuntimeFeatures::enableGeolocation(bool enable) 155 { 156 #if ENABLE(GEOLOCATION) 157 RuntimeEnabledFeatures::setGeolocationEnabled(enable); 158 #endif 159 } 160 161 bool WebRuntimeFeatures::isGeolocationEnabled() 162 { 163 #if ENABLE(GEOLOCATION) 164 return RuntimeEnabledFeatures::geolocationEnabled(); 165 #else 166 return false; 167 #endif 168 } 169 154 170 } // namespace WebKit
Note: See TracChangeset
for help on using the changeset viewer.