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 | |
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
82 files changed, 436 insertions, 218 deletions
diff --git a/webkit/extensions/v8/gc_extension.h b/webkit/extensions/v8/gc_extension.h index b34b1c3..ea5003b 100644 --- a/webkit/extensions/v8/gc_extension.h +++ b/webkit/extensions/v8/gc_extension.h @@ -6,6 +6,8 @@ #define WEBKIT_EXTENSIONS_V8_GC_EXTENSION_H_ #pragma once +#include "webkit/extensions/webkit_extensions_export.h" + namespace v8 { class Extension; } @@ -16,7 +18,7 @@ namespace extensions_v8 { // garbage collection. This should only be used for debugging. class GCExtension { public: - static v8::Extension* Get(); + WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get(); }; } // namespace extensions_v8 diff --git a/webkit/extensions/v8/heap_profiler_extension.h b/webkit/extensions/v8/heap_profiler_extension.h index 9d3abb39..6e28b20 100644 --- a/webkit/extensions/v8/heap_profiler_extension.h +++ b/webkit/extensions/v8/heap_profiler_extension.h @@ -6,6 +6,8 @@ #define WEBKIT_EXTENSIONS_V8_HEAP_PROFILER_EXTENSION_H_ #pragma once +#include "webkit/extensions/webkit_extensions_export.h" + namespace v8 { class Extension; } @@ -16,7 +18,7 @@ namespace extensions_v8 { // dumping native heap profiles. This should only be used for debugging. class HeapProfilerExtension { public: - static v8::Extension* Get(); + WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get(); }; } // namespace extensions_v8 diff --git a/webkit/extensions/v8/playback_extension.h b/webkit/extensions/v8/playback_extension.h index 3dc2be3..c425ea0 100644 --- a/webkit/extensions/v8/playback_extension.h +++ b/webkit/extensions/v8/playback_extension.h @@ -6,6 +6,8 @@ #define WEBKIT_EXTENSIONS_V8_PLAYBACK_EXTENSION_H_ #pragma once +#include "webkit/extensions/webkit_extensions_export.h" + namespace v8 { class Extension; } @@ -25,7 +27,7 @@ namespace extensions_v8 { // in exactly the same order in which they were recorded. class PlaybackExtension { public: - static v8::Extension* Get(); + WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get(); }; } // namespace extensions_v8 diff --git a/webkit/extensions/v8/profiler_extension.h b/webkit/extensions/v8/profiler_extension.h index 7032464..8098cb7 100644 --- a/webkit/extensions/v8/profiler_extension.h +++ b/webkit/extensions/v8/profiler_extension.h @@ -6,6 +6,8 @@ #define WEBKIT_EXTENSIONS_V8_PROFILER_EXTENSION_H_ #pragma once +#include "webkit/extensions/webkit_extensions_export.h" + namespace v8 { class Extension; } @@ -17,7 +19,7 @@ namespace extensions_v8 { // name is to distinguish it from the built-in V8 Profiler. class ProfilerExtension { public: - static v8::Extension* Get(); + WEBKIT_EXTENSIONS_EXPORT static v8::Extension* Get(); }; } // namespace extensions_v8 diff --git a/webkit/extensions/webkit_extensions_export.h b/webkit/extensions/webkit_extensions_export.h new file mode 100644 index 0000000..d48c4ef --- /dev/null +++ b/webkit/extensions/webkit_extensions_export.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_ +#define WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_ +#pragma once + +#if 0 // defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(WEBKIT_EXTENSIONS_IMPLEMENTATION) +#define WEBKIT_EXTENSIONS_EXPORT __declspec(dllexport) +#else +#define WEBKIT_EXTENSIONS_EXPORT __declspec(dllimport) +#endif // defined(WEBKIT_EXTENSIONS_IMPLEMENTATION) + +#else // defined(WIN32) +#define WEBKIT_EXTENSIONS_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define WEBKIT_EXTENSIONS_EXPORT +#endif + +#endif // WEBKIT_EXTENSIONS_WEBKIT_EXTENSIONS_EXPORT_H_ diff --git a/webkit/glue/alt_error_page_resource_fetcher.h b/webkit/glue/alt_error_page_resource_fetcher.h index 5987fe1..b402d4e 100644 --- a/webkit/glue/alt_error_page_resource_fetcher.h +++ b/webkit/glue/alt_error_page_resource_fetcher.h @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebFrame; @@ -28,11 +29,12 @@ class AltErrorPageResourceFetcher { typedef base::Callback<void(WebKit::WebFrame*, const WebKit::WebURLError&, const std::string&)> Callback; - AltErrorPageResourceFetcher(const GURL& url, - WebKit::WebFrame* frame, - const WebKit::WebURLError& original_error, - const Callback& callback); - ~AltErrorPageResourceFetcher(); + WEBKIT_GLUE_EXPORT AltErrorPageResourceFetcher( + const GURL& url, + WebKit::WebFrame* frame, + const WebKit::WebURLError& original_error, + const Callback& callback); + WEBKIT_GLUE_EXPORT ~AltErrorPageResourceFetcher(); // Stop any pending loads. void Cancel(); diff --git a/webkit/glue/context_menu.h b/webkit/glue/context_menu.h index 86dfbf5..128b47c 100644 --- a/webkit/glue/context_menu.h +++ b/webkit/glue/context_menu.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "webkit/glue/webkit_glue_export.h" #include "webkit/glue/webmenuitem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" @@ -25,7 +26,7 @@ struct CustomContextMenuContext { int32 render_widget_id; static const int32 kCurrentRenderWidget; - CustomContextMenuContext(); + WEBKIT_GLUE_EXPORT CustomContextMenuContext(); }; } // namespace webkit_glue @@ -37,7 +38,7 @@ struct CustomContextMenuContext { // they contain for the ContextMenu task. It might be better // to make the string fields more generic so that this object // could be used for more contextual actions. -struct ContextMenuParams { +struct WEBKIT_GLUE_EXPORT ContextMenuParams { // This is the type of Context Node that the context menu was invoked on. WebKit::WebContextMenuData::MediaType media_type; diff --git a/webkit/glue/cpp_binding_example.h b/webkit/glue/cpp_binding_example.h index fc61def..f092224 100644 --- a/webkit/glue/cpp_binding_example.h +++ b/webkit/glue/cpp_binding_example.h @@ -34,12 +34,13 @@ #define CPP_BINDING_EXAMPLE_H__ #include "webkit/glue/cpp_bound_class.h" +#include "webkit/glue/webkit_glue_export.h" class CppBindingExample : public CppBoundClass { public: // The default constructor initializes the property and method lists needed // to bind this class to a JS object. - CppBindingExample(); + WEBKIT_GLUE_EXPORT CppBindingExample(); // // These public member variables and methods implement the methods and diff --git a/webkit/glue/cpp_bound_class.h b/webkit/glue/cpp_bound_class.h index 8bc0dfd..61ccc31 100644 --- a/webkit/glue/cpp_bound_class.h +++ b/webkit/glue/cpp_bound_class.h @@ -25,6 +25,7 @@ #include "base/callback.h" #include "base/memory/scoped_ptr.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebFrame; @@ -34,7 +35,7 @@ typedef std::vector<CppVariant> CppArgumentList; // CppBoundClass lets you map Javascript method calls and property accesses // directly to C++ method calls and CppVariant* variable access. -class CppBoundClass { +class WEBKIT_GLUE_EXPORT CppBoundClass { public: class PropertyCallback { public: diff --git a/webkit/glue/cpp_variant.h b/webkit/glue/cpp_variant.h index 01efd7d..25cbe6f 100644 --- a/webkit/glue/cpp_variant.h +++ b/webkit/glue/cpp_variant.h @@ -23,8 +23,9 @@ #include "base/basictypes.h" #include "third_party/npapi/bindings/npruntime.h" +#include "webkit/glue/webkit_glue_export.h" -class CppVariant : public NPVariant { +class WEBKIT_GLUE_EXPORT CppVariant : public NPVariant { public: CppVariant(); ~CppVariant(); diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h index 924878f..eb99966 100644 --- a/webkit/glue/dom_operations.h +++ b/webkit/glue/dom_operations.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,6 +9,7 @@ #include <vector> #include "googleurl/src/gurl.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebDocument; @@ -49,7 +50,8 @@ struct SavableResourcesResult { // and sub-frame. After collecting all savable resource links, this function // will send those links to embedder. Return value indicates whether we get // all saved resource links successfully. -bool GetAllSavableResourceLinksForCurrentPage(WebKit::WebView* view, +WEBKIT_GLUE_EXPORT bool GetAllSavableResourceLinksForCurrentPage( + WebKit::WebView* view, const GURL& page_url, SavableResourcesResult* savable_resources_result, const char** savable_schemes); @@ -82,12 +84,12 @@ int NumberOfActiveAnimations(WebKit::WebView* view); // the value in "href". For BODY, TABLE, TR, TD, returns the value in // "background". For BLOCKQUOTE, Q, DEL, INS, returns the value in "cite" // attribute. Otherwise returns a null WebString. -WebKit::WebString GetSubResourceLinkFromElement( +WEBKIT_GLUE_EXPORT WebKit::WebString GetSubResourceLinkFromElement( const WebKit::WebElement& element); // Puts the meta-elements of |document| that have the attribute |attribute_name| // with a value of |attribute_value| in |meta_elements|. -void GetMetaElementsWithAttribute( +WEBKIT_GLUE_EXPORT void GetMetaElementsWithAttribute( WebKit::WebDocument* document, const string16& attribute_name, const string16& atribute_value, diff --git a/webkit/glue/form_data.h b/webkit/glue/form_data.h index 288e734..ee0f527 100644 --- a/webkit/glue/form_data.h +++ b/webkit/glue/form_data.h @@ -10,11 +10,12 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" #include "webkit/glue/form_field.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Holds information about a form to be filled and/or submitted. -struct FormData { +struct WEBKIT_GLUE_EXPORT FormData { // The name of the form. string16 name; // GET or POST. diff --git a/webkit/glue/form_data_predictions.h b/webkit/glue/form_data_predictions.h index 7661ff9..6e92e13 100644 --- a/webkit/glue/form_data_predictions.h +++ b/webkit/glue/form_data_predictions.h @@ -10,11 +10,12 @@ #include "webkit/glue/form_data.h" #include "webkit/glue/form_field_predictions.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Holds information about a form to be filled and/or submitted. -struct FormDataPredictions { +struct WEBKIT_GLUE_EXPORT FormDataPredictions { // Data for this form. FormData data; // The form signature for communication with the crowdsourcing server. diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h index 58a8653..a8480cd 100644 --- a/webkit/glue/form_field.h +++ b/webkit/glue/form_field.h @@ -9,11 +9,12 @@ #include "base/string16.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Stores information about a field in a form. -struct FormField { +struct WEBKIT_GLUE_EXPORT FormField { FormField(); virtual ~FormField(); @@ -41,7 +42,8 @@ struct FormField { }; // So we can compare FormFields with EXPECT_EQ(). -std::ostream& operator<<(std::ostream& os, const FormField& field); +WEBKIT_GLUE_EXPORT std::ostream& operator<<(std::ostream& os, + const FormField& field); } // namespace webkit_glue diff --git a/webkit/glue/form_field_predictions.h b/webkit/glue/form_field_predictions.h index baa8b3f..b4cf51d 100644 --- a/webkit/glue/form_field_predictions.h +++ b/webkit/glue/form_field_predictions.h @@ -9,11 +9,12 @@ #include <vector> #include "webkit/glue/form_field.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Stores information about a field in a form. -struct FormFieldPredictions { +struct WEBKIT_GLUE_EXPORT FormFieldPredictions { FormFieldPredictions(); FormFieldPredictions(const FormFieldPredictions& other); ~FormFieldPredictions(); diff --git a/webkit/glue/gl_bindings_skia_cmd_buffer.h b/webkit/glue/gl_bindings_skia_cmd_buffer.h index d7cfc47..a9ec8af 100644 --- a/webkit/glue/gl_bindings_skia_cmd_buffer.h +++ b/webkit/glue/gl_bindings_skia_cmd_buffer.h @@ -6,13 +6,15 @@ #define WEBKIT_GLUE_GL_BINDINGS_SKIA_CMD_BUFFER_H_ #pragma once +#include "webkit/glue/webkit_glue_export.h" + struct GrGLInterface; namespace webkit_glue { // The GPU back-end for skia requires pointers to GL functions. This function // returns a binding for skia-gpu to the cmd buffers GL. -GrGLInterface* CreateCommandBufferSkiaGLBinding(); +WEBKIT_GLUE_EXPORT GrGLInterface* CreateCommandBufferSkiaGLBinding(); } // namespace webkit_glue diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h index 9099941..6e4c575 100644 --- a/webkit/glue/glue_serialize.h +++ b/webkit/glue/glue_serialize.h @@ -12,18 +12,21 @@ #include <string> #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // HistoryItem serialization. -std::string HistoryItemToString(const WebKit::WebHistoryItem& item); -WebKit::WebHistoryItem HistoryItemFromString( +WEBKIT_GLUE_EXPORT std::string HistoryItemToString( + const WebKit::WebHistoryItem& item); +WEBKIT_GLUE_EXPORT WebKit::WebHistoryItem HistoryItemFromString( const std::string& serialized_item); // For testing purposes only. -void HistoryItemToVersionedString(const WebKit::WebHistoryItem& item, - int version, - std::string* serialized_item); +WEBKIT_GLUE_EXPORT void HistoryItemToVersionedString( + const WebKit::WebHistoryItem& item, + int version, + std::string* serialized_item); } // namespace webkit_glue diff --git a/webkit/glue/idb_bindings.h b/webkit/glue/idb_bindings.h index 7d7c90d..4ad4b98 100644 --- a/webkit/glue/idb_bindings.h +++ b/webkit/glue/idb_bindings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,6 +6,7 @@ #include "base/basictypes.h" #include "base/string16.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebIDBKey; @@ -16,13 +17,13 @@ namespace webkit_glue { // Warning: this method holds a V8 lock, it should only be called within a // sandbox. -bool IDBKeysFromValuesAndKeyPath( +WEBKIT_GLUE_EXPORT bool IDBKeysFromValuesAndKeyPath( const std::vector<WebKit::WebSerializedScriptValue>& serialized_script_values, const string16& idb_key_path, std::vector<WebKit::WebIDBKey>* values); -WebKit::WebSerializedScriptValue InjectIDBKey( +WEBKIT_GLUE_EXPORT WebKit::WebSerializedScriptValue InjectIDBKey( const WebKit::WebIDBKey& key, const WebKit::WebSerializedScriptValue& value, const string16& idb_key_path); diff --git a/webkit/glue/image_decoder.h b/webkit/glue/image_decoder.h index b19c8ef..1f7f266 100644 --- a/webkit/glue/image_decoder.h +++ b/webkit/glue/image_decoder.h @@ -1,9 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/basictypes.h" #include "ui/gfx/size.h" +#include "webkit/glue/webkit_glue_export.h" class SkBitmap; @@ -14,7 +15,7 @@ namespace webkit_glue { // Note to future: This class should be deleted. We should have our own nice // image decoders in base/gfx, and our port should use those. Currently, it's // the other way around. -class ImageDecoder { +class WEBKIT_GLUE_EXPORT ImageDecoder { public: // Use the constructor with desired_size when you think you may have an .ico // format and care about which size you get back. Otherwise, use the 0-arg diff --git a/webkit/glue/image_resource_fetcher.h b/webkit/glue/image_resource_fetcher.h index e9f0b51..d1a4f7d 100644 --- a/webkit/glue/image_resource_fetcher.h +++ b/webkit/glue/image_resource_fetcher.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/callback.h" #include "webkit/glue/resource_fetcher.h" +#include "webkit/glue/webkit_glue_export.h" class SkBitmap; @@ -20,14 +21,15 @@ class ImageResourceFetcher { public: typedef base::Callback<void(ImageResourceFetcher*, const SkBitmap&)> Callback; - ImageResourceFetcher(const GURL& image_url, - WebKit::WebFrame* frame, - int id, - int image_size, - WebKit::WebURLRequest::TargetType target_type, - const Callback& callback); + WEBKIT_GLUE_EXPORT ImageResourceFetcher( + const GURL& image_url, + WebKit::WebFrame* frame, + int id, + int image_size, + WebKit::WebURLRequest::TargetType target_type, + const Callback& callback); - virtual ~ImageResourceFetcher(); + WEBKIT_GLUE_EXPORT virtual ~ImageResourceFetcher(); // URL of the image we're downloading. const GURL& image_url() const { return image_url_; } diff --git a/webkit/glue/multipart_response_delegate.h b/webkit/glue/multipart_response_delegate.h index 8cae831..5cc3fd3 100644 --- a/webkit/glue/multipart_response_delegate.h +++ b/webkit/glue/multipart_response_delegate.h @@ -53,6 +53,7 @@ #include "base/basictypes.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebURLLoader; @@ -64,7 +65,7 @@ namespace webkit_glue { // Used by unit tests to access private members. class MultipartResponseDelegateTester; -class MultipartResponseDelegate { +class WEBKIT_GLUE_EXPORT MultipartResponseDelegate { public: MultipartResponseDelegate(WebKit::WebURLLoaderClient* client, WebKit::WebURLLoader* loader, @@ -90,10 +91,11 @@ class MultipartResponseDelegate { // Returns the lower and higher content ranges from an individual multipart // in a multipart response. // Returns true on success. - static bool ReadContentRanges(const WebKit::WebURLResponse& response, - int64* content_range_lower_bound, - int64* content_range_upper_bound, - int64* content_range_instance_size); + static bool ReadContentRanges( + const WebKit::WebURLResponse& response, + int64* content_range_lower_bound, + int64* content_range_upper_bound, + int64* content_range_instance_size); private: friend class MultipartResponseDelegateTester; // For unittests. diff --git a/webkit/glue/npruntime_util.h b/webkit/glue/npruntime_util.h index 1135246..586aab1 100644 --- a/webkit/glue/npruntime_util.h +++ b/webkit/glue/npruntime_util.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,15 +6,18 @@ #define WEBKIT_GLUE_NPRUNTIME_UTIL_H_ #include "third_party/npapi/bindings/npruntime.h" +#include "webkit/glue/webkit_glue_export.h" class Pickle; namespace webkit_glue { // Efficiently serialize/deserialize a NPIdentifier -bool SerializeNPIdentifier(NPIdentifier identifier, Pickle* pickle); -bool DeserializeNPIdentifier(const Pickle& pickle, void** pickle_iter, - NPIdentifier* identifier); +WEBKIT_GLUE_EXPORT bool SerializeNPIdentifier(NPIdentifier identifier, + Pickle* pickle); +WEBKIT_GLUE_EXPORT bool DeserializeNPIdentifier(const Pickle& pickle, + void** pickle_iter, + NPIdentifier* identifier); } // namespace webkit_glue diff --git a/webkit/glue/p2p_transport.h b/webkit/glue/p2p_transport.h index b60101a..cd24f46 100644 --- a/webkit/glue/p2p_transport.h +++ b/webkit/glue/p2p_transport.h @@ -9,6 +9,7 @@ #include <vector> #include "base/basictypes.h" +#include "webkit/glue/webkit_glue_export.h" namespace net { class Socket; @@ -50,7 +51,7 @@ class P2PTransport { virtual void OnError(int error) = 0; }; - struct Config { + struct WEBKIT_GLUE_EXPORT Config { Config(); ~Config(); diff --git a/webkit/glue/password_form.h b/webkit/glue/password_form.h index e48420c..cb27003 100644 --- a/webkit/glue/password_form.h +++ b/webkit/glue/password_form.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,6 +11,7 @@ #include "base/time.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPasswordFormData.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { @@ -36,7 +37,7 @@ namespace webkit_glue { // describe which fields are not strictly required when adding a saved password // entry to the database and how they can affect the matching process. -struct PasswordForm { +struct WEBKIT_GLUE_EXPORT PasswordForm { // Enum to differentiate between HTML form based authentication, and dialogs // using basic or digest schemes. Default is SCHEME_HTML. Only PasswordForms // of the same Scheme will be matched/autofilled against each other. diff --git a/webkit/glue/password_form_dom_manager.h b/webkit/glue/password_form_dom_manager.h index 7f201ff..b0891e4 100644 --- a/webkit/glue/password_form_dom_manager.h +++ b/webkit/glue/password_form_dom_manager.h @@ -9,6 +9,7 @@ #include "webkit/glue/form_data.h" #include "webkit/glue/password_form.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebForm; @@ -25,7 +26,7 @@ namespace webkit_glue { // unless the PasswordManager determined there is an additional risk // associated with this form. This can happen, for example, if action URI's // of the observed form and our saved representation don't match up. -struct PasswordFormFillData { +struct WEBKIT_GLUE_EXPORT PasswordFormFillData { typedef std::map<string16, string16> LoginCollection; FormData basic_data; @@ -41,7 +42,8 @@ class PasswordFormDomManager { // custom metadata to DOM nodes, so we have to do this every time an event // happens with a given form and compare against previously Create'd forms // to identify..which sucks. - static PasswordForm* CreatePasswordForm(const WebKit::WebFormElement& form); + WEBKIT_GLUE_EXPORT static PasswordForm* CreatePasswordForm( + const WebKit::WebFormElement& form); // Create a FillData structure in preparation for autofilling a form, // from basic_data identifying which form to fill, and a collection of @@ -49,7 +51,7 @@ class PasswordFormDomManager { // preferred_match should equal (address) one of matches. // wait_for_username_before_autofill is true if we should not autofill // anything until the user typed in a valid username and blurred the field. - static void InitFillData(const PasswordForm& form_on_page, + WEBKIT_GLUE_EXPORT static void InitFillData(const PasswordForm& form_on_page, const PasswordFormMap& matches, const PasswordForm* const preferred_match, bool wait_for_username_before_autofill, diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h index a1044c0..f863e97 100644 --- a/webkit/glue/resource_fetcher.h +++ b/webkit/glue/resource_fetcher.h @@ -16,12 +16,14 @@ #include "base/basictypes.h" #include "base/callback.h" +#include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/timer.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" +#include "webkit/glue/webkit_glue_export.h" class GURL; @@ -33,7 +35,8 @@ struct WebURLError; namespace webkit_glue { -class ResourceFetcher : public WebKit::WebURLLoaderClient { +class WEBKIT_GLUE_EXPORT ResourceFetcher : + NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) { public: // This will be called when the URL has been fetched, successfully or not. // If there is a failure, response and data will both be empty. |response| @@ -107,7 +110,7 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { ///////////////////////////////////////////////////////////////////////////// // A resource fetcher with a timeout -class ResourceFetcherWithTimeout : public ResourceFetcher { +class WEBKIT_GLUE_EXPORT ResourceFetcherWithTimeout : public ResourceFetcher { public: ResourceFetcherWithTimeout(const GURL& url, WebKit::WebFrame* frame, diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index da0a36e..c870f7ab 100644 --- a/webkit/glue/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -34,6 +34,7 @@ #include "net/url_request/url_request_status.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" #include "webkit/glue/resource_type.h" +#include "webkit/glue/webkit_glue_export.h" namespace net { class HttpResponseHeaders; @@ -48,8 +49,8 @@ namespace webkit_glue { // All the values for starts and ends are given in milliseconds and are // offsets with respect to the given base time. struct ResourceLoadTimingInfo { - ResourceLoadTimingInfo(); - ~ResourceLoadTimingInfo(); + WEBKIT_GLUE_EXPORT ResourceLoadTimingInfo(); + WEBKIT_GLUE_EXPORT ~ResourceLoadTimingInfo(); // All the values in this struct are given as offsets in milliseconds wrt // this base time. @@ -103,8 +104,8 @@ struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { typedef std::vector<std::pair<std::string, std::string> > HeadersVector; - ResourceDevToolsInfo(); - ~ResourceDevToolsInfo(); + WEBKIT_GLUE_EXPORT ResourceDevToolsInfo(); + WEBKIT_GLUE_EXPORT ~ResourceDevToolsInfo(); int32 http_status_code; std::string http_status_text; @@ -115,8 +116,8 @@ struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { }; struct ResourceResponseInfo { - ResourceResponseInfo(); - ~ResourceResponseInfo(); + WEBKIT_GLUE_EXPORT ResourceResponseInfo(); + WEBKIT_GLUE_EXPORT ~ResourceResponseInfo(); // The time at which the request was made that resulted in this response. // For cached responses, this time could be "far" in the past. @@ -198,7 +199,7 @@ class ResourceLoaderBridge { public: // Structure used when calling // WebKitPlatformSupportImpl::CreateResourceLoader(). - struct RequestInfo { + struct WEBKIT_GLUE_EXPORT RequestInfo { RequestInfo(); ~RequestInfo(); @@ -331,7 +332,7 @@ class ResourceLoaderBridge { // use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but // anybody can delete at any time, INCLUDING during processing of callbacks. - virtual ~ResourceLoaderBridge(); + WEBKIT_GLUE_EXPORT virtual ~ResourceLoaderBridge(); // Call this method before calling Start() to append a chunk of binary data // to the request body. May only be used with HTTP(S) POST requests. @@ -392,7 +393,7 @@ class ResourceLoaderBridge { // WebKitPlatformSupportImpl::CreateResourceLoader() // For HTTP(S) POST requests, the AppendDataToUpload and AppendFileToUpload // methods may be called to construct the body of the request. - ResourceLoaderBridge(); + WEBKIT_GLUE_EXPORT ResourceLoaderBridge(); private: DISALLOW_COPY_AND_ASSIGN(ResourceLoaderBridge); diff --git a/webkit/glue/resource_type.h b/webkit/glue/resource_type.h index fd708d7..56757b1 100644 --- a/webkit/glue/resource_type.h +++ b/webkit/glue/resource_type.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "webkit/glue/webkit_glue_export.h" class ResourceType { public: @@ -39,7 +40,8 @@ class ResourceType { return static_cast<Type>(type); } - static Type FromTargetType(WebKit::WebURLRequest::TargetType type); + WEBKIT_GLUE_EXPORT static Type FromTargetType( + WebKit::WebURLRequest::TargetType type); static bool IsFrame(ResourceType::Type type) { return type == MAIN_FRAME || type == SUB_FRAME; diff --git a/webkit/glue/simple_webmimeregistry_impl.h b/webkit/glue/simple_webmimeregistry_impl.h index dddf5fb..3ec2f68 100644 --- a/webkit/glue/simple_webmimeregistry_impl.h +++ b/webkit/glue/simple_webmimeregistry_impl.h @@ -5,11 +5,14 @@ #ifndef WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ +#include "base/compiler_specific.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMimeRegistry.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { -class SimpleWebMimeRegistryImpl : public WebKit::WebMimeRegistry { +class WEBKIT_GLUE_EXPORT SimpleWebMimeRegistryImpl : + NON_EXPORTED_BASE(public WebKit::WebMimeRegistry) { public: SimpleWebMimeRegistryImpl() {} virtual ~SimpleWebMimeRegistryImpl() {} diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h index 733b542..8c4e184 100644 --- a/webkit/glue/web_intent_data.h +++ b/webkit/glue/web_intent_data.h @@ -6,11 +6,12 @@ #define WEBKIT_GLUE_WEB_INTENT_DATA_H_ #include "base/string16.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Representation of the Web Intent data being initiated or delivered. -struct WebIntentData { +struct WEBKIT_GLUE_EXPORT WebIntentData { // The action of the intent. string16 action; // The MIME type of data in this intent payload. diff --git a/webkit/glue/web_intent_service_data.h b/webkit/glue/web_intent_service_data.h index aa0a2a6..d23f3dd 100644 --- a/webkit/glue/web_intent_service_data.h +++ b/webkit/glue/web_intent_service_data.h @@ -8,12 +8,13 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "webkit/glue/webkit_glue_export.h" #include <iosfwd> namespace webkit_glue { // Describes the relevant elements of a WebIntent service. -struct WebIntentServiceData { +struct WEBKIT_GLUE_EXPORT WebIntentServiceData { // An intents disposition determines which context the service is opened in. enum Disposition { DISPOSITION_WINDOW, // Open service inside a new window. (Default) @@ -39,8 +40,9 @@ struct WebIntentServiceData { }; // Printing operator - helps gtest produce readable error messages. -std::ostream& operator<<(std::ostream& os, - const webkit_glue::WebIntentServiceData& intent); +WEBKIT_GLUE_EXPORT std::ostream& operator<<( + std::ostream& os, + const webkit_glue::WebIntentServiceData& intent); } // namespace webkit_glue diff --git a/webkit/glue/web_io_operators.h b/webkit/glue/web_io_operators.h index e60ef72..12052d2 100644 --- a/webkit/glue/web_io_operators.h +++ b/webkit/glue/web_io_operators.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,6 +8,7 @@ #include <iosfwd> #include "build/build_config.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { @@ -17,7 +18,8 @@ std::ostream& operator<<(std::ostream& out, const WebString& s); #endif // defined(WCHAR_T_IS_UTF32) struct WebPoint; -std::ostream& operator<<(std::ostream& out, const WebPoint& p); +WEBKIT_GLUE_EXPORT std::ostream& operator<<(std::ostream& out, + const WebPoint& p); struct WebRect; std::ostream& operator<<(std::ostream& out, const WebRect& p); diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h index 4167dce..38c602d 100644 --- a/webkit/glue/webaccessibility.h +++ b/webkit/glue/webaccessibility.h @@ -11,6 +11,7 @@ #include "base/string16.h" #include "ui/gfx/rect.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebAccessibilityObject; @@ -21,7 +22,7 @@ namespace webkit_glue { // A compact representation of the accessibility information for a // single web object, in a form that can be serialized and sent from // the renderer process to the browser process. -struct WebAccessibility { +struct WEBKIT_GLUE_EXPORT WebAccessibility { public: // An enumeration of accessibility roles. enum Role { diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h index c1514f2..8c21ddd 100644 --- a/webkit/glue/webclipboard_impl.h +++ b/webkit/glue/webclipboard_impl.h @@ -5,15 +5,18 @@ #ifndef WEBCLIPBOARD_IMPL_H_ #define WEBCLIPBOARD_IMPL_H_ +#include "base/compiler_specific.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" #include "ui/base/clipboard/clipboard.h" +#include "webkit/glue/webkit_glue_export.h" #include <string> namespace webkit_glue { class ClipboardClient; -class WebClipboardImpl : public WebKit::WebClipboard { +class WEBKIT_GLUE_EXPORT WebClipboardImpl : + NON_EXPORTED_BASE(public WebKit::WebClipboard) { public: static std::string URLToMarkup(const WebKit::WebURL& url, const WebKit::WebString& title); diff --git a/webkit/glue/webcookie.h b/webkit/glue/webcookie.h index 11411d8..ca079b4 100644 --- a/webkit/glue/webcookie.h +++ b/webkit/glue/webcookie.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -10,10 +10,11 @@ #define WEBKIT_GLUE_WEBCOOKIE_H_ #include "net/base/cookie_monster.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { -struct WebCookie { +struct WEBKIT_GLUE_EXPORT WebCookie { WebCookie(); explicit WebCookie(const net::CookieMonster::CanonicalCookie& c); WebCookie(const std::string& name, const std::string& value, diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h index 9439a15..78c6387 100644 --- a/webkit/glue/webcursor.h +++ b/webkit/glue/webcursor.h @@ -9,6 +9,7 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" #include "ui/gfx/size.h" +#include "webkit/glue/webkit_glue_export.h" #include <vector> @@ -39,7 +40,7 @@ struct WebCursorInfo; // specific methods are provided to translate the cross-platform cursor into a // platform specific cursor. It is also possible to serialize / de-serialize a // WebCursor. -class WebCursor { +class WEBKIT_GLUE_EXPORT WebCursor { public: WebCursor(); explicit WebCursor(const WebKit::WebCursorInfo& cursor_info); diff --git a/webkit/glue/webdropdata.h b/webkit/glue/webdropdata.h index a9a4ae7..8b79a78 100644 --- a/webkit/glue/webdropdata.h +++ b/webkit/glue/webdropdata.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -14,6 +14,7 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "webkit/glue/webkit_glue_export.h" struct IDataObject; @@ -21,7 +22,7 @@ namespace WebKit { class WebDragData; } -struct WebDropData { +struct WEBKIT_GLUE_EXPORT WebDropData { // Construct from a WebDragData object. explicit WebDropData(const WebKit::WebDragData&); diff --git a/webkit/glue/webfileutilities_impl.h b/webkit/glue/webfileutilities_impl.h index 14d7a422..e2d24f2 100644 --- a/webkit/glue/webfileutilities_impl.h +++ b/webkit/glue/webfileutilities_impl.h @@ -1,16 +1,18 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #ifndef WEBFILEUTILITIES_IMPL_H_ #define WEBFILEUTILITIES_IMPL_H_ #include "base/platform_file.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileUtilities.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { -class WebFileUtilitiesImpl : public WebKit::WebFileUtilities { +class WEBKIT_GLUE_EXPORT WebFileUtilitiesImpl : + NON_EXPORTED_BASE(public WebKit::WebFileUtilities) { public: WebFileUtilitiesImpl(); virtual ~WebFileUtilitiesImpl(); diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index b57f7d3..014acc4 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -108,6 +108,11 @@ 'target_name': 'glue', 'type': 'static_library', 'variables': { 'enable_wexit_time_destructors': 1, }, + 'defines': [ + 'WEBKIT_EXTENSIONS_IMPLEMENTATION', + 'WEBKIT_GLUE_IMPLEMENTATION', + 'WEBKIT_PLUGINS_IMPLEMENTATION', + ], 'dependencies': [ '<(DEPTH)/base/base.gyp:base_i18n', '<(DEPTH)/base/base.gyp:base_static', @@ -326,6 +331,7 @@ '../plugins/ppapi/webkit_forwarding_impl.h', '../plugins/sad_plugin.cc', '../plugins/sad_plugin.h', + '../plugins/webkit_plugins_export.h', '../plugins/webplugininfo.cc', '../plugins/webplugininfo.h', '../plugins/webview_plugin.cc', @@ -403,6 +409,7 @@ 'webkit_constants.h', 'webkit_glue.cc', 'webkit_glue.h', + 'webkit_glue_export.h', 'webkitplatformsupport_impl.cc', 'webkitplatformsupport_impl.h', 'webmenuitem.cc', @@ -444,6 +451,7 @@ '../extensions/v8/playback_extension.h', '../extensions/v8/profiler_extension.cc', '../extensions/v8/profiler_extension.h', + '../extensions/webkit_extensions_export.h', ], # When glue is a dependency, it needs to be a hard dependency. 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 diff --git a/webkit/glue/webkit_glue_export.h b/webkit/glue/webkit_glue_export.h new file mode 100644 index 0000000..8dfccad --- /dev/null +++ b/webkit/glue/webkit_glue_export.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_GLUE_WEBKIT_GLUE_EXPORT_H_ +#define WEBKIT_GLUE_WEBKIT_GLUE_EXPORT_H_ +#pragma once + +#if 0 // defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(WEBKIT_GLUE_IMPLEMENTATION) +#define WEBKIT_GLUE_EXPORT __declspec(dllexport) +#else +#define WEBKIT_GLUE_EXPORT __declspec(dllimport) +#endif // defined(WEBKIT_GLUE_IMPLEMENTATION) + +#else // defined(WIN32) +#define WEBKIT_GLUE_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define WEBKIT_GLUE_EXPORT +#endif + +#endif // WEBKIT_GLUE_WEBKIT_GLUE_EXPORT_H_ diff --git a/webkit/glue/webkitplatformsupport_impl.h b/webkit/glue/webkitplatformsupport_impl.h index 7ecbd3a..d68e1a3 100644 --- a/webkit/glue/webkitplatformsupport_impl.h +++ b/webkit/glue/webkitplatformsupport_impl.h @@ -5,11 +5,14 @@ #ifndef WEBKIT_PLATFORM_SUPPORT_IMPL_H_ #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ +#include "base/compiler_specific.h" #include "base/platform_file.h" #include "base/threading/thread_local_storage.h" #include "base/timer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitPlatformSupport.h" #include "webkit/glue/resource_loader_bridge.h" +#include "webkit/glue/webkit_glue_export.h" + #if defined(OS_WIN) #include "webkit/glue/webthemeengine_impl_win.h" #elif defined(OS_MACOSX) @@ -34,7 +37,8 @@ namespace webkit_glue { class WebSocketStreamHandleDelegate; class WebSocketStreamHandleBridge; -class WebKitPlatformSupportImpl : public WebKit::WebKitPlatformSupport { +class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : + NON_EXPORTED_BASE(public WebKit::WebKitPlatformSupport) { public: WebKitPlatformSupportImpl(); virtual ~WebKitPlatformSupportImpl(); diff --git a/webkit/glue/webmenuitem.h b/webkit/glue/webmenuitem.h index 48f006d..3b1e5d2 100644 --- a/webkit/glue/webmenuitem.h +++ b/webkit/glue/webmenuitem.h @@ -9,10 +9,11 @@ #include "base/string16.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" +#include "webkit/glue/webkit_glue_export.h" // Container for information about entries in an HTML select popup menu and // custom entries of the context menu. -struct WebMenuItem { +struct WEBKIT_GLUE_EXPORT WebMenuItem { enum Type { OPTION = WebKit::WebMenuItemInfo::Option, CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption, diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index 5cf7aa0..67518b5 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -16,12 +16,13 @@ #include "base/string16.h" #include "googleurl/src/gurl.h" +#include "webkit/glue/webkit_glue_export.h" namespace WebKit { class WebView; } -struct WebPreferences { +struct WEBKIT_GLUE_EXPORT WebPreferences { // Map of ISO 15924 four-letter script code to font family. For example, // "Arab" to "My Arabic Font". typedef std::vector<std::pair<std::string, string16> > ScriptFontFamilyMap; diff --git a/webkit/glue/webthread_impl.h b/webkit/glue/webthread_impl.h index 842c8c6..576acc1 100644 --- a/webkit/glue/webthread_impl.h +++ b/webkit/glue/webthread_impl.h @@ -7,13 +7,14 @@ #include "base/threading/thread.h" #include "base/memory/scoped_ptr.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebThread.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { class WebThreadImpl : public WebKit::WebThread { public: - WebThreadImpl(const char* name); - virtual ~WebThreadImpl(); + WEBKIT_GLUE_EXPORT WebThreadImpl(const char* name); + WEBKIT_GLUE_EXPORT virtual ~WebThreadImpl(); virtual void postTask(Task* task) OVERRIDE; virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE; diff --git a/webkit/glue/weburlloader_impl.h b/webkit/glue/weburlloader_impl.h index 226c2d1..2a06d87 100644 --- a/webkit/glue/weburlloader_impl.h +++ b/webkit/glue/weburlloader_impl.h @@ -7,6 +7,7 @@ #include "base/memory/ref_counted.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { @@ -29,7 +30,7 @@ class WebURLLoaderImpl : public WebKit::WebURLLoader { virtual void cancel(); virtual void setDefersLoading(bool value); - void UpdateRoutingId(int new_routing_id); + WEBKIT_GLUE_EXPORT void UpdateRoutingId(int new_routing_id); private: class Context; diff --git a/webkit/glue/weburlrequest_extradata_impl.h b/webkit/glue/weburlrequest_extradata_impl.h index 07fc672..17a0579 100644 --- a/webkit/glue/weburlrequest_extradata_impl.h +++ b/webkit/glue/weburlrequest_extradata_impl.h @@ -9,12 +9,14 @@ #include "base/compiler_specific.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "webkit/glue/webkit_glue_export.h" namespace webkit_glue { // Base class for Chrome's implementation of the "extra data" stored in each // ResourceRequest. -class WebURLRequestExtraDataImpl : public WebKit::WebURLRequest::ExtraData { +class WEBKIT_GLUE_EXPORT WebURLRequestExtraDataImpl : + NON_EXPORTED_BASE(public WebKit::WebURLRequest::ExtraData) { public: WebURLRequestExtraDataImpl(WebKit::WebReferrerPolicy referrer_policy); virtual ~WebURLRequestExtraDataImpl(); diff --git a/webkit/glue/window_open_disposition.h b/webkit/glue/window_open_disposition.h index 06bda03..4929875 100644 --- a/webkit/glue/window_open_disposition.h +++ b/webkit/glue/window_open_disposition.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,6 +6,7 @@ #define WEBKIT_GLUE_WINDOW_OPEN_DISPOSITION_H_ #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" +#include "webkit/glue/webkit_glue_export.h" enum WindowOpenDisposition { UNKNOWN, @@ -23,7 +24,7 @@ enum WindowOpenDisposition { }; // Conversion function: -WindowOpenDisposition NavigationPolicyToDisposition( +WEBKIT_GLUE_EXPORT WindowOpenDisposition NavigationPolicyToDisposition( WebKit::WebNavigationPolicy policy); #endif // WEBKIT_GLUE_WINDOW_OPEN_DISPOSITION_H_ diff --git a/webkit/plugins/npapi/plugin_constants_win.h b/webkit/plugins/npapi/plugin_constants_win.h index edfbaaf..2ef80fe 100644 --- a/webkit/plugins/npapi/plugin_constants_win.h +++ b/webkit/plugins/npapi/plugin_constants_win.h @@ -6,6 +6,7 @@ #define WEBKIT_PLUGINS_NPAPI_PLUGIN_CONSTANTS_WIN_H_ #include "base/string16.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace npapi { @@ -14,22 +15,22 @@ namespace npapi { extern const char16 kNativeWindowClassName[]; // If property is non-zero window reparenting must add UIPI message filters. -extern const char16 kNativeWindowClassFilterProp[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kNativeWindowClassFilterProp[]; // The name of the window class name for the wrapper HWND around the actual // plugin window that's used when running in multi-process mode. This window // is created on the browser UI thread. -extern const char16 kWrapperNativeWindowClassName[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kWrapperNativeWindowClassName[]; // The name of the custom window message that the browser uses to tell the // plugin process to paint a window. -extern const char16 kPaintMessageName[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kPaintMessageName[]; // The name of the registry key which NPAPI plugins update on installation. -extern const char16 kRegistryMozillaPlugins[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kRegistryMozillaPlugins[]; extern const char16 kMozillaActiveXPlugin[]; -extern const char16 kNewWMPPlugin[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kNewWMPPlugin[]; extern const char16 kOldWMPPlugin[]; extern const char16 kYahooApplicationStatePlugin[]; extern const char16 kWanWangProtocolHandlerPlugin[]; diff --git a/webkit/plugins/npapi/plugin_group.h b/webkit/plugins/npapi/plugin_group.h index 5880532..94e643d 100644 --- a/webkit/plugins/npapi/plugin_group.h +++ b/webkit/plugins/npapi/plugin_group.h @@ -12,6 +12,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/string16.h" +#include "webkit/plugins/webkit_plugins_export.h" #include "webkit/plugins/webplugininfo.h" class FilePath; @@ -72,7 +73,7 @@ struct VersionRange { // of a plugin that is needed in order not to exhibit known security // vulnerabilities. -class PluginGroup { +class WEBKIT_PLUGINS_EXPORT PluginGroup { public: // Used by about:plugins to disable Reader plugin when internal PDF viewer is // enabled. diff --git a/webkit/plugins/npapi/plugin_host.h b/webkit/plugins/npapi/plugin_host.h index 2666e28..4eb38dc 100644 --- a/webkit/plugins/npapi/plugin_host.h +++ b/webkit/plugins/npapi/plugin_host.h @@ -13,6 +13,7 @@ #include "base/memory/ref_counted.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/nphostapi.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace npapi { @@ -28,7 +29,7 @@ class PluginHost : public base::RefCounted<PluginHost> { public: // Access the single PluginHost instance. Callers // must call deref() when finished with the object. - static PluginHost* Singleton(); + WEBKIT_PLUGINS_EXPORT static PluginHost* Singleton(); // The table of functions provided to the plugin. NPNetscapeFuncs* host_functions() { return &host_funcs_; } @@ -43,7 +44,7 @@ class PluginHost : public base::RefCounted<PluginHost> { std::vector<std::string>* values, std::vector<char>* body); - void PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides); + WEBKIT_PLUGINS_EXPORT void PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides); private: friend class base::RefCounted<PluginHost>; diff --git a/webkit/plugins/npapi/plugin_lib.h b/webkit/plugins/npapi/plugin_lib.h index 3ae5d9e..9051e2d 100644 --- a/webkit/plugins/npapi/plugin_lib.h +++ b/webkit/plugins/npapi/plugin_lib.h @@ -14,6 +14,7 @@ #include "build/build_config.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin.h" +#include "webkit/plugins/webkit_plugins_export.h" class FilePath; @@ -24,7 +25,7 @@ class PluginInstance; // A PluginLib is a single NPAPI Plugin Library, and is the lifecycle // manager for new PluginInstances. -class PluginLib : public base::RefCounted<PluginLib> { +class WEBKIT_PLUGINS_EXPORT PluginLib : public base::RefCounted<PluginLib> { public: static PluginLib* CreatePluginLib(const FilePath& filename); diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h index 6265ec7..83822e7 100644 --- a/webkit/plugins/npapi/plugin_list.h +++ b/webkit/plugins/npapi/plugin_list.h @@ -18,6 +18,7 @@ #include "base/synchronization/lock.h" #include "third_party/npapi/bindings/nphostapi.h" #include "webkit/plugins/npapi/plugin_group.h" +#include "webkit/plugins/webkit_plugins_export.h" #include "webkit/plugins/webplugininfo.h" class GURL; @@ -32,7 +33,7 @@ struct DefaultLazyInstanceTraits; namespace webkit { namespace npapi { -extern FilePath::CharType kDefaultPluginLibraryName[]; +WEBKIT_PLUGINS_EXPORT extern FilePath::CharType kDefaultPluginLibraryName[]; // This struct holds entry points into a plugin. The entry points are // slightly different between Win/Mac and Unixes. Note that the interface for @@ -54,7 +55,7 @@ struct PluginEntryPoints { // the correct types. On Linux, it walks the plugin directories as well // (e.g. /usr/lib/browser-plugins/). // This object is thread safe. -class PluginList { +class WEBKIT_PLUGINS_EXPORT PluginList { public: // Gets the one instance of the PluginList. static PluginList* Singleton(); diff --git a/webkit/plugins/npapi/webplugin.h b/webkit/plugins/npapi/webplugin.h index f861517..1a14ed6 100644 --- a/webkit/plugins/npapi/webplugin.h +++ b/webkit/plugins/npapi/webplugin.h @@ -12,6 +12,7 @@ #include "ui/gfx/gl/gpu_preference.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" +#include "webkit/plugins/webkit_plugins_export.h" // TODO(port): this typedef is obviously incorrect on non-Windows // platforms, but now a lot of code now accidentally depends on them @@ -30,7 +31,7 @@ class WebPluginAcceleratedSurface; #endif // Describes the new location for a plugin window. -struct WebPluginGeometry { +struct WEBKIT_PLUGINS_EXPORT WebPluginGeometry { WebPluginGeometry(); ~WebPluginGeometry(); diff --git a/webkit/plugins/npapi/webplugin_delegate.h b/webkit/plugins/npapi/webplugin_delegate.h index 9009ebf..ce96884 100644 --- a/webkit/plugins/npapi/webplugin_delegate.h +++ b/webkit/plugins/npapi/webplugin_delegate.h @@ -13,6 +13,7 @@ #include "third_party/npapi/bindings/npapi.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" #include "ui/gfx/native_widget_types.h" +#include "webkit/plugins/webkit_plugins_export.h" class GURL; struct NPObject; @@ -33,7 +34,7 @@ class WebPlugin; class WebPluginResourceClient; // This is the interface that a plugin implementation needs to provide. -class WebPluginDelegate { +class WEBKIT_PLUGINS_EXPORT WebPluginDelegate { public: virtual ~WebPluginDelegate() {} diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h index f811d72..bd83fa72 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl.h +++ b/webkit/plugins/npapi/webplugin_delegate_impl.h @@ -19,6 +19,7 @@ #include "ui/gfx/rect.h" #include "webkit/plugins/npapi/webplugin_delegate.h" #include "webkit/glue/webcursor.h" +#include "webkit/plugins/webkit_plugins_export.h" #if defined(OS_WIN) && !defined(USE_AURA) #include "base/memory/weak_ptr.h" @@ -61,7 +62,7 @@ class WebPluginIMEWin; // An implementation of WebPluginDelegate that runs in the plugin process, // proxied from the renderer by WebPluginDelegateProxy. -class WebPluginDelegateImpl : public WebPluginDelegate { +class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate { public: enum PluginQuirks { PLUGIN_QUIRK_SETWINDOW_TWICE = 1, // Win32 diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h index ec0f30f..f1e5fd0 100644 --- a/webkit/plugins/npapi/webplugin_impl.h +++ b/webkit/plugins/npapi/webplugin_impl.h @@ -21,6 +21,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" #include "ui/gfx/native_widget_types.h" #include "webkit/plugins/npapi/webplugin.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace WebKit { class WebFrame; @@ -43,9 +44,10 @@ class WebPluginPageDelegate; // This is the WebKit side of the plugin implementation that forwards calls, // after changing out of WebCore types, to a delegate. The delegate may // be in a different process. -class WebPluginImpl : public WebPlugin, - public WebKit::WebPlugin, - public WebKit::WebURLLoaderClient { +class WEBKIT_PLUGINS_EXPORT WebPluginImpl : + NON_EXPORTED_BASE(public WebPlugin), + NON_EXPORTED_BASE(public WebKit::WebPlugin), + NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) { public: WebPluginImpl( WebKit::WebFrame* frame, diff --git a/webkit/plugins/plugin_constants.h b/webkit/plugins/plugin_constants.h index b100d99..b53c22a 100644 --- a/webkit/plugins/plugin_constants.h +++ b/webkit/plugins/plugin_constants.h @@ -5,12 +5,14 @@ #ifndef WEBKIT_PLUGINS_PLUGIN_CONSTANTS_H_ #define WEBKIT_PLUGINS_PLUGIN_CONSTANTS_H_ -extern const char kFlashPluginName[]; -extern const char kFlashPluginSwfMimeType[]; -extern const char kFlashPluginSwfExtension[]; -extern const char kFlashPluginSwfDescription[]; -extern const char kFlashPluginSplMimeType[]; -extern const char kFlashPluginSplExtension[]; -extern const char kFlashPluginSplDescription[]; +#include "webkit/plugins/webkit_plugins_export.h" + +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginName[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfMimeType[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfExtension[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfDescription[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplMimeType[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplExtension[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplDescription[]; #endif // WEBKIT_PLUGINS_PLUGIN_CONSTANTS_H_ diff --git a/webkit/plugins/plugin_switches.h b/webkit/plugins/plugin_switches.h index 7093edb..46f435c 100644 --- a/webkit/plugins/plugin_switches.h +++ b/webkit/plugins/plugin_switches.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,15 +6,16 @@ #define WEBKIT_PLUGINS_PLUGIN_SWITCHES_H_ #include "build/build_config.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace switches { -extern const char kDebugPluginLoading[]; -extern const char kDisablePepper3dForUntrustedUse[]; -extern const char kEnablePepperTesting[]; +WEBKIT_PLUGINS_EXPORT extern const char kDebugPluginLoading[]; +WEBKIT_PLUGINS_EXPORT extern const char kDisablePepper3dForUntrustedUse[]; +WEBKIT_PLUGINS_EXPORT extern const char kEnablePepperTesting[]; #if defined(OS_WIN) -extern const char kUseOldWMPPlugin[]; +WEBKIT_PLUGINS_EXPORT extern const char kUseOldWMPPlugin[]; #endif } // namespace switches diff --git a/webkit/plugins/ppapi/callbacks.h b/webkit/plugins/ppapi/callbacks.h index 5fbee60..3f92a01 100644 --- a/webkit/plugins/ppapi/callbacks.h +++ b/webkit/plugins/ppapi/callbacks.h @@ -13,6 +13,7 @@ #include "base/task.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_resource.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -76,7 +77,7 @@ class CallbackTracker : public base::RefCountedThreadSafe<CallbackTracker> { private: friend class base::RefCountedThreadSafe<CallbackTracker>; - ~CallbackTracker(); + WEBKIT_PLUGINS_EXPORT ~CallbackTracker(); // |TrackedCallback| are expected to automatically add and // remove themselves from their provided |CallbackTracker|. @@ -132,7 +133,7 @@ class TrackedCallback : public base::RefCountedThreadSafe<TrackedCallback> { // These run the callback in an abortive manner, or post a task to do so (but // immediately marking the callback as to be aborted). - void Abort(); + WEBKIT_PLUGINS_EXPORT void Abort(); void PostAbort(); // Returns the ID of the resource which "owns" the callback, or 0 if the @@ -179,14 +180,15 @@ class TrackedCompletionCallback : public TrackedCallback { public: // Create a tracked completion callback and register it with the tracker. The // resource ID may be 0 if the callback is not associated to any resource. - TrackedCompletionCallback(const scoped_refptr<CallbackTracker>& tracker, - PP_Resource resource_id, - const PP_CompletionCallback& callback); + WEBKIT_PLUGINS_EXPORT TrackedCompletionCallback( + const scoped_refptr<CallbackTracker>& tracker, + PP_Resource resource_id, + const PP_CompletionCallback& callback); // Run the callback with the given result. If the callback had previously been // marked as to be aborted (by |PostAbort()|), |result| will be ignored and // the callback will be run with result |PP_ERROR_ABORTED|. - void Run(int32_t result); + WEBKIT_PLUGINS_EXPORT void Run(int32_t result); protected: // |TrackedCallback| method: diff --git a/webkit/plugins/ppapi/file_path.h b/webkit/plugins/ppapi/file_path.h index 5630ca4..ce8fe53 100644 --- a/webkit/plugins/ppapi/file_path.h +++ b/webkit/plugins/ppapi/file_path.h @@ -8,6 +8,7 @@ #include <string> #include "base/file_path.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -29,8 +30,8 @@ class PepperFilePath { DOMAIN_MAX_VALID = DOMAIN_MODULE_LOCAL }; - PepperFilePath(); - PepperFilePath(Domain d, const FilePath& p); + WEBKIT_PLUGINS_EXPORT PepperFilePath(); + WEBKIT_PLUGINS_EXPORT PepperFilePath(Domain d, const FilePath& p); static PepperFilePath MakeAbsolute(const FilePath& path); static PepperFilePath MakeModuleLocal(PluginModule* module, diff --git a/webkit/plugins/ppapi/host_globals.h b/webkit/plugins/ppapi/host_globals.h index 7a4b497..51b7827 100644 --- a/webkit/plugins/ppapi/host_globals.h +++ b/webkit/plugins/ppapi/host_globals.h @@ -10,6 +10,7 @@ #include "ppapi/shared_impl/var_tracker.h" #include "webkit/plugins/ppapi/host_resource_tracker.h" #include "webkit/plugins/ppapi/host_var_tracker.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -71,13 +72,13 @@ class HostGlobals : public ::ppapi::PpapiGlobals { // Returns a pointer to the plugin instance object associated with the given // instance handle. The return value will be NULL if the handle is invalid or // if the instance has crashed. - PluginInstance* GetInstance(PP_Instance instance); + WEBKIT_PLUGINS_EXPORT PluginInstance* GetInstance(PP_Instance instance); private: // Per-instance data we track. struct InstanceData; - static HostGlobals* host_globals_; + WEBKIT_PLUGINS_EXPORT static HostGlobals* host_globals_; HostResourceTracker host_resource_tracker_; HostVarTracker host_var_tracker_; diff --git a/webkit/plugins/ppapi/host_var_tracker.h b/webkit/plugins/ppapi/host_var_tracker.h index b8cdb07..73b4272 100644 --- a/webkit/plugins/ppapi/host_var_tracker.h +++ b/webkit/plugins/ppapi/host_var_tracker.h @@ -19,6 +19,7 @@ #include "ppapi/shared_impl/function_group_base.h" #include "ppapi/shared_impl/resource_tracker.h" #include "ppapi/shared_impl/var_tracker.h" +#include "webkit/plugins/webkit_plugins_export.h" typedef struct NPObject NPObject; @@ -52,7 +53,8 @@ class HostVarTracker : public ::ppapi::VarTracker { // Returns the number of NPObjectVar's associated with the given instance. // Returns 0 if the instance isn't known. - int GetLiveNPObjectVarsForInstance(PP_Instance instance) const; + WEBKIT_PLUGINS_EXPORT int GetLiveNPObjectVarsForInstance( + PP_Instance instance) const; // Forcibly deletes all np object vars for the given instance. Used for // instance cleanup. diff --git a/webkit/plugins/ppapi/npapi_glue.h b/webkit/plugins/ppapi/npapi_glue.h index 30e9ae3..c59de0a 100644 --- a/webkit/plugins/ppapi/npapi_glue.h +++ b/webkit/plugins/ppapi/npapi_glue.h @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "ppapi/c/pp_module.h" #include "ppapi/c/pp_var.h" +#include "webkit/plugins/webkit_plugins_export.h" struct NPObject; typedef struct _NPVariant NPVariant; @@ -37,7 +38,8 @@ bool PPVarToNPVariant(PP_Var var, NPVariant* result); // // The returned PP_Var will have a refcount of 1, this passing ownership of // the reference to the caller. This is suitable for returning to a plugin. -PP_Var NPVariantToPPVar(PluginInstance* instance, const NPVariant* variant); +WEBKIT_PLUGINS_EXPORT PP_Var NPVariantToPPVar(PluginInstance* instance, + const NPVariant* variant); // Returns a NPIdentifier that corresponds to the given PP_Var. The contents // of the PP_Var will be copied. Returns 0 if the given PP_Var is not a a @@ -64,7 +66,8 @@ PP_Var NPIdentifierToPPVar(PP_Module module, NPIdentifier id); // Note: this could easily be changed to take a PP_Instance instead if that // makes certain calls in the future easier. Currently all callers have a // PluginInstance so that's what we use here. -PP_Var NPObjectToPPVar(PluginInstance* instance, NPObject* object); +WEBKIT_PLUGINS_EXPORT PP_Var NPObjectToPPVar(PluginInstance* instance, + NPObject* object); // PPResultAndExceptionToNPResult ---------------------------------------------- diff --git a/webkit/plugins/ppapi/npobject_var.h b/webkit/plugins/ppapi/npobject_var.h index f82861a..597799a 100644 --- a/webkit/plugins/ppapi/npobject_var.h +++ b/webkit/plugins/ppapi/npobject_var.h @@ -11,6 +11,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_module.h" #include "ppapi/shared_impl/var.h" +#include "webkit/plugins/webkit_plugins_export.h" typedef struct NPObject NPObject; typedef struct _NPVariant NPVariant; @@ -54,7 +55,7 @@ class NPObjectVar : public Var { // Helper function that converts a PP_Var to an object. This will return NULL // if the PP_Var is not of object type or the object is invalid. - static scoped_refptr<NPObjectVar> FromPPVar(PP_Var var); + WEBKIT_PLUGINS_EXPORT static scoped_refptr<NPObjectVar> FromPPVar(PP_Var var); private: // Possibly 0 if the object has outlived its instance. diff --git a/webkit/plugins/ppapi/plugin_module.h b/webkit/plugins/ppapi/plugin_module.h index 231f18b..dc2eaff 100644 --- a/webkit/plugins/ppapi/plugin_module.h +++ b/webkit/plugins/ppapi/plugin_module.h @@ -21,6 +21,7 @@ #include "ppapi/c/pp_module.h" #include "ppapi/c/ppb.h" #include "webkit/plugins/ppapi/plugin_delegate.h" +#include "webkit/plugins/webkit_plugins_export.h" class FilePath; struct PPB_Core; @@ -42,8 +43,9 @@ class PluginInstance; // // Note: to get from a PP_Instance to a PluginInstance*, use the // ResourceTracker. -class PluginModule : public base::RefCounted<PluginModule>, - public base::SupportsWeakPtr<PluginModule> { +class WEBKIT_PLUGINS_EXPORT PluginModule : + public base::RefCounted<PluginModule>, + public base::SupportsWeakPtr<PluginModule> { public: typedef const void* (*GetInterfaceFunc)(const char*); typedef int (*PPP_InitializeModuleFunc)(PP_Module, PPB_GetInterface); @@ -51,7 +53,7 @@ class PluginModule : public base::RefCounted<PluginModule>, struct EntryPoints { // This structure is POD, with the constructor initializing to NULL. - EntryPoints(); + WEBKIT_PLUGINS_EXPORT EntryPoints(); GetInterfaceFunc get_interface; PPP_InitializeModuleFunc initialize_module; diff --git a/webkit/plugins/ppapi/ppapi_interface_factory.h b/webkit/plugins/ppapi/ppapi_interface_factory.h index d625f1e..1b574aa 100644 --- a/webkit/plugins/ppapi/ppapi_interface_factory.h +++ b/webkit/plugins/ppapi/ppapi_interface_factory.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "base/lazy_instance.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -21,10 +22,10 @@ class PpapiInterfaceFactoryManager { typedef const void* (InterfaceFactory)(const std::string& interface_name); // Registers a custom PPAPI interface factory. - void RegisterFactory(InterfaceFactory* factory); + WEBKIT_PLUGINS_EXPORT void RegisterFactory(InterfaceFactory* factory); // Unregisters the custom PPAPI interface factory passed in. - void UnregisterFactory(InterfaceFactory* factory); + WEBKIT_PLUGINS_EXPORT void UnregisterFactory(InterfaceFactory* factory); // Returns a pointer to the interface identified by the name passed in. // Returns NULL if no factory handles this interface. @@ -32,7 +33,7 @@ class PpapiInterfaceFactoryManager { // Returns a pointer to the global instance of the // PpapiInterfaceFactoryManager class. - static PpapiInterfaceFactoryManager* GetInstance(); + WEBKIT_PLUGINS_EXPORT static PpapiInterfaceFactoryManager* GetInstance(); private: friend struct base::DefaultLazyInstanceTraits<PpapiInterfaceFactoryManager>; diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h index 56ea1e3..aca56dc 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.h +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h @@ -36,6 +36,7 @@ #include "ui/base/ime/text_input_type.h" #include "ui/gfx/rect.h" #include "webkit/plugins/ppapi/plugin_delegate.h" +#include "webkit/plugins/webkit_plugins_export.h" struct PP_Var; struct PPP_Find_Dev; @@ -81,10 +82,11 @@ class PPB_URLRequestInfo_Impl; // // Note: to get from a PP_Instance to a PluginInstance*, use the // ResourceTracker. -class PluginInstance : public base::RefCounted<PluginInstance>, - public ::ppapi::FunctionGroupBase, - public ::ppapi::thunk::PPB_Instance_FunctionAPI, - public ::ppapi::InstanceImpl { +class WEBKIT_PLUGINS_EXPORT PluginInstance : + public base::RefCounted<PluginInstance>, + public ::ppapi::FunctionGroupBase, + NON_EXPORTED_BASE(public ::ppapi::thunk::PPB_Instance_FunctionAPI), + public ::ppapi::InstanceImpl { public: // Create and return a PluginInstance object which supports the // PPP_Instance_1_0 interface. diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.h b/webkit/plugins/ppapi/ppapi_webplugin_impl.h index e2a37cc..cca3c61 100644 --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.h +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.h @@ -13,6 +13,7 @@ #include "base/task.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" #include "ui/gfx/rect.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace WebKit { struct WebPluginParams; @@ -28,14 +29,15 @@ class PPB_URLLoader_Impl; class WebPluginImpl : public WebKit::WebPlugin { public: - WebPluginImpl(PluginModule* module, - const WebKit::WebPluginParams& params, - const base::WeakPtr<PluginDelegate>& plugin_delegate); + WEBKIT_PLUGINS_EXPORT WebPluginImpl( + PluginModule* module, + const WebKit::WebPluginParams& params, + const base::WeakPtr<PluginDelegate>& plugin_delegate); private: friend class DeleteTask<WebPluginImpl>; - virtual ~WebPluginImpl(); + WEBKIT_PLUGINS_EXPORT virtual ~WebPluginImpl(); // WebKit::WebPlugin implementation. virtual bool initialize(WebKit::WebPluginContainer* container); diff --git a/webkit/plugins/ppapi/ppb_broker_impl.h b/webkit/plugins/ppapi/ppb_broker_impl.h index 3974657..9d20a4d 100644 --- a/webkit/plugins/ppapi/ppb_broker_impl.h +++ b/webkit/plugins/ppapi/ppb_broker_impl.h @@ -6,6 +6,7 @@ #define WEBKIT_PLUGINS_PPAPI_PPB_BROKER_IMPL_H_ #include "base/basictypes.h" +#include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/trusted/ppb_broker_trusted.h" @@ -14,13 +15,15 @@ #include "webkit/plugins/ppapi/plugin_delegate.h" #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" #include "webkit/plugins/ppapi/callbacks.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { -class PPB_Broker_Impl : public ::ppapi::Resource, - public ::ppapi::thunk::PPB_Broker_API, - public base::SupportsWeakPtr<PPB_Broker_Impl> { +class WEBKIT_PLUGINS_EXPORT PPB_Broker_Impl + : public ::ppapi::Resource, + NON_EXPORTED_BASE(public ::ppapi::thunk::PPB_Broker_API), + public base::SupportsWeakPtr<PPB_Broker_Impl> { public: explicit PPB_Broker_Impl(PP_Instance instance); virtual ~PPB_Broker_Impl(); diff --git a/webkit/plugins/ppapi/ppb_file_chooser_impl.h b/webkit/plugins/ppapi/ppb_file_chooser_impl.h index 74c05d1..8b76c4f 100644 --- a/webkit/plugins/ppapi/ppb_file_chooser_impl.h +++ b/webkit/plugins/ppapi/ppb_file_chooser_impl.h @@ -13,6 +13,7 @@ #include "ppapi/c/dev/ppb_file_chooser_dev.h" #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_file_chooser_api.h" +#include "webkit/plugins/webkit_plugins_export.h" struct PP_CompletionCallback; @@ -70,7 +71,7 @@ class PPB_FileChooser_Impl : public ::ppapi::Resource, // Splits a comma-separated MIME type list |accept_mime_types|, trims the // resultant split types, makes them lowercase, and returns them. // Though this should be private, this is public for testing. - static std::vector<WebKit::WebString> ParseAcceptValue( + WEBKIT_PLUGINS_EXPORT static std::vector<WebKit::WebString> ParseAcceptValue( const std::string& accept_mime_types); private: diff --git a/webkit/plugins/ppapi/ppb_flash_menu_impl.h b/webkit/plugins/ppapi/ppb_flash_menu_impl.h index fc0b99d..5f454f9 100644 --- a/webkit/plugins/ppapi/ppb_flash_menu_impl.h +++ b/webkit/plugins/ppapi/ppb_flash_menu_impl.h @@ -15,6 +15,7 @@ #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_flash_menu_api.h" #include "webkit/plugins/ppapi/callbacks.h" +#include "webkit/plugins/webkit_plugins_export.h" struct WebMenuItem; @@ -38,7 +39,7 @@ class PPB_Flash_Menu_Impl : public ::ppapi::Resource, PP_CompletionCallback callback) OVERRIDE; // Called to complete |Show()|. - void CompleteShow(int32_t result, unsigned action); + WEBKIT_PLUGINS_EXPORT void CompleteShow(int32_t result, unsigned action); typedef std::vector<WebMenuItem> MenuData; const MenuData& menu_data() const { return menu_data_; } diff --git a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h index bd2e97a..56fd60d 100644 --- a/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h +++ b/webkit/plugins/ppapi/ppb_flash_net_connector_impl.h @@ -12,6 +12,7 @@ #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_flash_net_connector_api.h" #include "webkit/plugins/ppapi/callbacks.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -41,9 +42,10 @@ class PPB_Flash_NetConnector_Impl PP_CompletionCallback callback) OVERRIDE; // Called to complete |ConnectTcp()| and |ConnectTcpAddress()|. - void CompleteConnectTcp(PP_FileHandle socket, - const PP_NetAddress_Private& local_addr, - const PP_NetAddress_Private& remote_addr); + WEBKIT_PLUGINS_EXPORT void CompleteConnectTcp( + PP_FileHandle socket, + const PP_NetAddress_Private& local_addr, + const PP_NetAddress_Private& remote_addr); private: // Any pending callback (for |ConnectTcp()| or |ConnectTcpAddress()|). diff --git a/webkit/plugins/ppapi/ppb_image_data_impl.h b/webkit/plugins/ppapi/ppb_image_data_impl.h index c02b3e3..1c6b7ff 100644 --- a/webkit/plugins/ppapi/ppb_image_data_impl.h +++ b/webkit/plugins/ppapi/ppb_image_data_impl.h @@ -12,6 +12,7 @@ #include "ppapi/shared_impl/resource.h" #include "ppapi/thunk/ppb_image_data_api.h" #include "webkit/plugins/ppapi/plugin_delegate.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace skia { class PlatformCanvas; @@ -29,7 +30,7 @@ class PPB_ImageData_Impl : public ::ppapi::Resource, // If you call this constructor, you must also call Init before use. Normally // you should use the static Create function, but this constructor is needed // for some internal uses of ImageData (like Graphics2D). - explicit PPB_ImageData_Impl(PP_Instance instance); + WEBKIT_PLUGINS_EXPORT explicit PPB_ImageData_Impl(PP_Instance instance); virtual ~PPB_ImageData_Impl(); static PP_Resource Create(PP_Instance pp_instance, @@ -37,9 +38,9 @@ class PPB_ImageData_Impl : public ::ppapi::Resource, const PP_Size& size, PP_Bool init_to_zero); - bool Init(PP_ImageDataFormat format, - int width, int height, - bool init_to_zero); + WEBKIT_PLUGINS_EXPORT bool Init(PP_ImageDataFormat format, + int width, int height, + bool init_to_zero); int width() const { return width_; } int height() const { return height_; } diff --git a/webkit/plugins/ppapi/ppb_url_request_info_impl.h b/webkit/plugins/ppapi/ppb_url_request_info_impl.h index 65937c9..d9841f0 100644 --- a/webkit/plugins/ppapi/ppb_url_request_info_impl.h +++ b/webkit/plugins/ppapi/ppb_url_request_info_impl.h @@ -8,6 +8,7 @@ #include "base/memory/ref_counted.h" #include "ppapi/thunk/ppb_url_request_info_api.h" #include "ppapi/shared_impl/url_request_info_impl.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace WebKit { class WebFrame; @@ -18,7 +19,8 @@ class WebURLRequest; namespace webkit { namespace ppapi { -class PPB_URLRequestInfo_Impl : public ::ppapi::URLRequestInfoImpl { +class WEBKIT_PLUGINS_EXPORT PPB_URLRequestInfo_Impl : + public ::ppapi::URLRequestInfoImpl { public: explicit PPB_URLRequestInfo_Impl( PP_Instance instance, diff --git a/webkit/plugins/ppapi/quota_file_io.h b/webkit/plugins/ppapi/quota_file_io.h index 7d3235e..252ec11 100644 --- a/webkit/plugins/ppapi/quota_file_io.h +++ b/webkit/plugins/ppapi/quota_file_io.h @@ -13,6 +13,7 @@ #include "googleurl/src/gurl.h" #include "ppapi/c/pp_file_info.h" #include "ppapi/c/pp_instance.h" +#include "webkit/plugins/webkit_plugins_export.h" #include "webkit/quota/quota_types.h" namespace webkit { @@ -28,11 +29,11 @@ class QuotaFileIO { typedef base::FileUtilProxy::WriteCallback WriteCallback; typedef base::FileUtilProxy::StatusCallback StatusCallback; - QuotaFileIO(PP_Instance instance, - base::PlatformFile file, - const GURL& path_url, - PP_FileSystemType type); - ~QuotaFileIO(); + WEBKIT_PLUGINS_EXPORT QuotaFileIO(PP_Instance instance, + base::PlatformFile file, + const GURL& path_url, + PP_FileSystemType type); + WEBKIT_PLUGINS_EXPORT ~QuotaFileIO(); // Performs write or setlength operation with quota checks. // Returns true when the operation is successfully dispatched. @@ -44,16 +45,18 @@ class QuotaFileIO { // SetLength/WillSetLength cannot be called while there're any in-flight // operations. For Write/WillWrite it is guaranteed that |callback| are // always dispatched in the same order as Write being called. - bool Write(int64_t offset, - const char* buffer, - int32_t bytes_to_write, - const WriteCallback& callback); - bool WillWrite(int64_t offset, - int32_t bytes_to_write, - const WriteCallback& callback); - - bool SetLength(int64_t length, const StatusCallback& callback); - bool WillSetLength(int64_t length, const StatusCallback& callback); + WEBKIT_PLUGINS_EXPORT bool Write(int64_t offset, + const char* buffer, + int32_t bytes_to_write, + const WriteCallback& callback); + WEBKIT_PLUGINS_EXPORT bool WillWrite(int64_t offset, + int32_t bytes_to_write, + const WriteCallback& callback); + + WEBKIT_PLUGINS_EXPORT bool SetLength(int64_t length, + const StatusCallback& callback); + WEBKIT_PLUGINS_EXPORT bool WillSetLength(int64_t length, + const StatusCallback& callback); // Returns the plugin delegate or NULL if the resource has outlived the // instance. diff --git a/webkit/plugins/ppapi/resource_helper.h b/webkit/plugins/ppapi/resource_helper.h index d958889..1f245a1 100644 --- a/webkit/plugins/ppapi/resource_helper.h +++ b/webkit/plugins/ppapi/resource_helper.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "ppapi/c/pp_resource.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace ppapi { class Resource; @@ -32,7 +33,8 @@ class ResourceHelper { // Returns the module for the given resource, or NULL if the resource has // outlived its instance. - static PluginModule* GetPluginModule(const ::ppapi::Resource* resource); + WEBKIT_PLUGINS_EXPORT static PluginModule* GetPluginModule( + const ::ppapi::Resource* resource); // Returns the plugin delegate for the given resource, or NULL if the // resource has outlived its instance. diff --git a/webkit/plugins/ppapi/webkit_forwarding_impl.h b/webkit/plugins/ppapi/webkit_forwarding_impl.h index 2a5eeef..ee39754 100644 --- a/webkit/plugins/ppapi/webkit_forwarding_impl.h +++ b/webkit/plugins/ppapi/webkit_forwarding_impl.h @@ -5,6 +5,7 @@ #include "ppapi/shared_impl/webkit_forwarding.h" #include "base/compiler_specific.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace ppapi { struct Preferences; @@ -15,8 +16,8 @@ namespace ppapi { class WebKitForwardingImpl : public ::ppapi::WebKitForwarding { public: - WebKitForwardingImpl(); - virtual ~WebKitForwardingImpl(); + WEBKIT_PLUGINS_EXPORT WebKitForwardingImpl(); + WEBKIT_PLUGINS_EXPORT virtual ~WebKitForwardingImpl(); virtual void CreateFontForwarding(base::WaitableEvent* event, const PP_FontDescription_Dev& desc, diff --git a/webkit/plugins/sad_plugin.h b/webkit/plugins/sad_plugin.h index 63b0d7f..d9ed70b 100644 --- a/webkit/plugins/sad_plugin.h +++ b/webkit/plugins/sad_plugin.h @@ -6,6 +6,7 @@ #define WEBKIT_PLUGINS_SAD_PLUGIN_H_ #include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" +#include "webkit/plugins/webkit_plugins_export.h" class SkBitmap; @@ -17,9 +18,9 @@ namespace webkit { // Paints the sad plugin to the given canvas for the given plugin bounds. This // is used by both the NPAPI and the PPAPI out-of-process plugin impls. -void PaintSadPlugin(WebKit::WebCanvas* canvas, - const gfx::Rect& plugin_rect, - const SkBitmap& sad_plugin_bitmap); +WEBKIT_PLUGINS_EXPORT void PaintSadPlugin(WebKit::WebCanvas* canvas, + const gfx::Rect& plugin_rect, + const SkBitmap& sad_plugin_bitmap); } // namespace diff --git a/webkit/plugins/webkit_plugins_export.h b/webkit/plugins/webkit_plugins_export.h new file mode 100644 index 0000000..1f4bef9 --- /dev/null +++ b/webkit/plugins/webkit_plugins_export.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_PLUGINS_WEBKIT_PLUGINS_EXPORT_H_ +#define WEBKIT_PLUGINS_WEBKIT_PLUGINS_EXPORT_H_ +#pragma once + +#if 0 // defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(WEBKIT_PLUGINS_IMPLEMENTATION) +#define WEBKIT_PLUGINS_EXPORT __declspec(dllexport) +#else +#define WEBKIT_PLUGINS_EXPORT __declspec(dllimport) +#endif // defined(WEBKIT_PLUGINS_IMPLEMENTATION) + +#else // defined(WIN32) +#define WEBKIT_PLUGINS_EXPORT __attribute__((visibility("default"))) +#endif + +#else // defined(COMPONENT_BUILD) +#define WEBKIT_PLUGINS_EXPORT +#endif + +#endif // WEBKIT_PLUGINS_WEBKIT_PLUGINS_EXPORT_H_ diff --git a/webkit/plugins/webplugininfo.h b/webkit/plugins/webplugininfo.h index bb633f8e..8e72af6 100644 --- a/webkit/plugins/webplugininfo.h +++ b/webkit/plugins/webplugininfo.h @@ -10,10 +10,11 @@ #include "base/basictypes.h" #include "base/file_path.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { -struct WebPluginMimeType { +struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType { WebPluginMimeType(); // A constructor for the common case of a single file extension and an ASCII // description. @@ -37,7 +38,7 @@ struct WebPluginMimeType { }; // Describes an available NPAPI or Pepper plugin. -struct WebPluginInfo { +struct WEBKIT_PLUGINS_EXPORT WebPluginInfo { enum PluginType { PLUGIN_TYPE_NPAPI, PLUGIN_TYPE_PEPPER_IN_PROCESS, @@ -76,9 +77,9 @@ struct WebPluginInfo { }; // Checks whether a plugin is a Pepper plugin, enabled or disabled. -bool IsPepperPlugin(const WebPluginInfo& plugin); +WEBKIT_PLUGINS_EXPORT bool IsPepperPlugin(const WebPluginInfo& plugin); -bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); +WEBKIT_PLUGINS_EXPORT bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); } // namespace webkit diff --git a/webkit/plugins/webview_plugin.h b/webkit/plugins/webview_plugin.h index 7146d98..6afac18 100644 --- a/webkit/plugins/webview_plugin.h +++ b/webkit/plugins/webview_plugin.h @@ -15,6 +15,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace WebKit { class WebMouseEvent; @@ -56,10 +57,11 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, // Convenience method to set up a new WebViewPlugin using |preferences| // and displaying |html_data|. |url| should be a (fake) chrome:// URL; it is // only used for navigation and never actually resolved. - static WebViewPlugin* Create(Delegate* delegate, - const WebPreferences& preferences, - const std::string& html_data, - const GURL& url); + WEBKIT_PLUGINS_EXPORT static WebViewPlugin* Create( + Delegate* delegate, + const WebPreferences& preferences, + const std::string& html_data, + const GURL& url); WebKit::WebView* web_view() { return web_view_; } @@ -68,9 +70,9 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient, // When loading a plug-in document (i.e. a full page plug-in not embedded in // another page), we save all data that has been received, and replay it with // this method on the actual plug-in. - void ReplayReceivedData(WebKit::WebPlugin* plugin); + WEBKIT_PLUGINS_EXPORT void ReplayReceivedData(WebKit::WebPlugin* plugin); - void RestoreTitleText(); + WEBKIT_PLUGINS_EXPORT void RestoreTitleText(); // WebPlugin methods: virtual bool initialize(WebKit::WebPluginContainer*); |