Changes between Version 17 and Version 18 of Modules
- Timestamp:
- Feb 27, 2012, 11:32:27 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Modules
v17 v18 17 17 Even self-contained features often need to expose JavaScript APIs on "catch-all" interfaces like DOMWindow or Navigator. If we declared these APIs in DOMWindow.idl and implemented them in DOMWindow.h/cpp, the complexity of DOMWindow would increase with each added feature. To avoid complexity creep in these core classes, you can declare your JavaScript API in supplemental IDL files, mirroring the "partial interface" WebIDL mechanism used in specifications. For more details, see the [http://trac.webkit.org/wiki/WebKitIDL#Supplemental documentation of the Supplemental attribute]. 18 18 19 The MediaStream module [http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.idl uses this mechanism] to add the webkitGetUserMedia API to Navigator. The API is implemented in [http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.cpp NavigatorMediaStream.cpp], avoiding bloat in Navigator.cpp itself.19 For example, the MediaStream module [http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.idl uses this mechanism] to add the webkitGetUserMedia API to Navigator. The API is implemented in [http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaStream.cpp NavigatorMediaStream.cpp], avoiding bloat in Navigator.cpp itself and helping to contain the MediaStream code in the MediaStream directory. 20 20 21 21 == Associating state with "core" objects ==