1This directory contains the Chromium WebKit API. 2 3 4OVERVIEW 5 6 The Chromium WebKit API provides a stable interface to WebCore without 7 revealing any of the WebCore or WTF types to the consumer. 8 9 The 'public' directory contains the API headers, and the 'src' directory 10 contains the API implementation. The API is intended to be used either as a 11 shared or static library. 12 13 14COMPATIBILITY 15 16 No attempt is made to support runtime compatibility in a shared library 17 build. Instead, the API is intended to support backwards compatibility at 18 build time. C++ symbols are allowed in other words. 19 20 21DEFINES 22 23 WEBKIT_IMPLEMENTATION is defined when building the 'src' directory. 24 Consumers should not define this macro. 25 26 WEBKIT_DLL is defined when building as a shared library. This should be 27 defined when building the 'src' directory, and it should also be defined by 28 the consumer to ensure proper linkage to the shared library. 29 30 WEBKIT_API is defined for platforms (e.g., Windows) that require additional 31 annotations on functions and methods, which should be exported from WebKit 32 when it is built as a DLL. In general, this includes all public methods 33 unless the methods are defined inline, marked pure virtual, or contained 34 within a WEBKIT_IMPLEMENTATION section. Also, any private method called by a 35 public inline-defined method should be annotated with WEBKIT_API. WEBKIT_API 36 is not used to export whole classes. 37 38 WEBKIT_USING_SKIA is defined when using Skia as the graphics library. 39 40 WEBKIT_USING_CG is defined when using CG as the graphics library. 41 42 WEBKIT_USING_V8 is defined when using V8 as the JavaScript library. 43 44 WEBKIT_USING_JSC is defined when using JSC as the JavaScript library. 45 46 47BASIC TYPES 48 49 Use of STL is prohibited except in cases where it would be allowed in 50 WebCore. This includes non-allocating uses: algorithms, numeric limits, etc. 51 WTF container classes should be used in the implementation of this API. 52 53 The API includes some usage of WebCore types when WEBKIT_IMPLEMENTATION is 54 defined. This is only done for the convenience to the implementation, and 55 should not be considered part of the Chromium WebKit API. Similarly, STL 56 types are assumed when WEBKIT_IMPLEMENTATION is not defined, which is done 57 for the convenience of the consumer. 58