diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 19:07:50 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 19:07:50 +0000 |
commit | 51678ad73ad231bd77862f53e18e629420a26042 (patch) | |
tree | c54dc34d5d64fb1c796aa52573bbd23c24f2ca65 /webkit/glue/webkit_glue.h | |
parent | 8470f4693faac244f839c38358512244b47cb680 (diff) | |
download | chromium_src-51678ad73ad231bd77862f53e18e629420a26042.zip chromium_src-51678ad73ad231bd77862f53e18e629420a26042.tar.gz chromium_src-51678ad73ad231bd77862f53e18e629420a26042.tar.bz2 |
Add exports needed for glue to build as a component.
This adds WEBKIT_GLUE_EXPORT, WEBKIT_PLUGINS_EXPORT, and WEBKIT_EXTENSIONS_EXPORT macros that are used by the files in
webkit/{glue,plugins,extensions} to show what needs to be exported from a DLL.
R=darin@chromium.org
BUG=98755
TEST=waterfall stays green.
Review URL: http://codereview.chromium.org/8741006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.h')
-rw-r--r-- | webkit/glue/webkit_glue.h | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index ef00fb4..615a184 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -19,6 +19,7 @@ #include "base/string16.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" +#include "webkit/glue/webkit_glue_export.h" class GURL; class SkBitmap; @@ -38,13 +39,13 @@ class WebString; namespace webkit_glue { -void SetJavaScriptFlags(const std::string& flags); +WEBKIT_GLUE_EXPORT void SetJavaScriptFlags(const std::string& flags); // Turn on logging for flags in the provided comma delimited list. -void EnableWebCoreLogChannels(const std::string& channels); +WEBKIT_GLUE_EXPORT void EnableWebCoreLogChannels(const std::string& channels); // Returns the text of the document element. -string16 DumpDocumentText(WebKit::WebFrame* web_frame); +WEBKIT_GLUE_EXPORT string16 DumpDocumentText(WebKit::WebFrame* web_frame); // Returns the text of the document element and optionally its child frames. // If recursive is false, this is equivalent to DumpDocumentText followed by @@ -52,7 +53,7 @@ string16 DumpDocumentText(WebKit::WebFrame* web_frame); string16 DumpFramesAsText(WebKit::WebFrame* web_frame, bool recursive); // Returns the renderer's description of its tree (its externalRepresentation). -string16 DumpRenderer(WebKit::WebFrame* web_frame); +WEBKIT_GLUE_EXPORT string16 DumpRenderer(WebKit::WebFrame* web_frame); // Fill the value of counter in the element specified by the id into // counter_value. Return false when the specified id doesn't exist. @@ -76,41 +77,45 @@ string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); // Returns a dump of the given history state suitable for implementing the // dumpBackForwardList command of the layoutTestController. -string16 DumpHistoryState(const std::string& history_state, int indent, - bool is_current); +WEBKIT_GLUE_EXPORT string16 DumpHistoryState(const std::string& history_state, + int indent, + bool is_current); // Sets the user agent. Pass true for overriding if this is a custom // user agent instead of the default one (in order to turn off any browser // sniffing workarounds). This must be called before GetUserAgent() can // be called. -void SetUserAgent(const std::string& user_agent, bool overriding); +WEBKIT_GLUE_EXPORT void SetUserAgent(const std::string& user_agent, + bool overriding); // Returns the user agent to use for the given URL. SetUserAgent() must // be called prior to calling this function. -const std::string& GetUserAgent(const GURL& url); +WEBKIT_GLUE_EXPORT const std::string& GetUserAgent(const GURL& url); // Creates serialized state for the specified URL. This is a variant of // HistoryItemToString (in glue_serialize) that is used during session restore // if the saved state is empty. -std::string CreateHistoryStateForURL(const GURL& url); +WEBKIT_GLUE_EXPORT std::string CreateHistoryStateForURL(const GURL& url); // Removes any form data state from the history state string |content_state|. -std::string RemoveFormDataFromHistoryState(const std::string& content_state); +WEBKIT_GLUE_EXPORT std::string RemoveFormDataFromHistoryState( + const std::string& content_state); // Removes scroll offset from the history state string |content_state|. -std::string RemoveScrollOffsetFromHistoryState( +WEBKIT_GLUE_EXPORT std::string RemoveScrollOffsetFromHistoryState( const std::string& content_state); #ifndef NDEBUG // Checks various important objects to see if there are any in memory, and // calls AppendToLog with any leaked objects. Designed to be called on // shutdown. -void CheckForLeaks(); +WEBKIT_GLUE_EXPORT void CheckForLeaks(); #endif // Decodes the image from the data in |image_data| into |image|. // Returns false if the image could not be decoded. -bool DecodeImage(const std::string& image_data, SkBitmap* image); +WEBKIT_GLUE_EXPORT bool DecodeImage(const std::string& image_data, + SkBitmap* image); // Tells the plugin thread to terminate the process forcefully instead of // exiting cleanly. @@ -118,31 +123,35 @@ void SetForcefullyTerminatePluginProcess(bool value); // Returns true if the plugin thread should terminate the process forcefully // instead of exiting cleanly. -bool ShouldForcefullyTerminatePluginProcess(); +WEBKIT_GLUE_EXPORT bool ShouldForcefullyTerminatePluginProcess(); // File path string conversions. -FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str); -WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str); -FilePath WebStringToFilePath(const WebKit::WebString& str); -WebKit::WebString FilePathToWebString(const FilePath& file_path); +WEBKIT_GLUE_EXPORT FilePath::StringType WebStringToFilePathString( + const WebKit::WebString& str); +WEBKIT_GLUE_EXPORT WebKit::WebString FilePathStringToWebString( + const FilePath::StringType& str); +WEBKIT_GLUE_EXPORT FilePath WebStringToFilePath(const WebKit::WebString& str); +WEBKIT_GLUE_EXPORT WebKit::WebString FilePathToWebString( + const FilePath& file_path); // File error conversion -WebKit::WebFileError PlatformFileErrorToWebFileError( +WEBKIT_GLUE_EXPORT WebKit::WebFileError PlatformFileErrorToWebFileError( base::PlatformFileError error_code); // Returns a WebCanvas pointer associated with the given Skia canvas. -WebKit::WebCanvas* ToWebCanvas(skia::PlatformCanvas*); +WEBKIT_GLUE_EXPORT WebKit::WebCanvas* ToWebCanvas(skia::PlatformCanvas*); // Returns the number of currently-active glyph pages this process is using. // There can be many such pages (maps of 256 character -> glyph) so this is // used to get memory usage statistics. -int GetGlyphPageCount(); +WEBKIT_GLUE_EXPORT int GetGlyphPageCount(); // Returns WebKit Web Inspector protocol version. std::string GetInspectorProtocolVersion(); // Tells caller whether the given protocol version is supported by the. -bool IsInspectorProtocolVersionSupported(const std::string& version); +WEBKIT_GLUE_EXPORT bool IsInspectorProtocolVersionSupported( + const std::string& version); } // namespace webkit_glue |