diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:44:39 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-14 00:44:39 +0000 |
commit | e4be2dd25b1883bad7bed358e52e04f01c6e6f78 (patch) | |
tree | 842b39b7ea3547a97e07e2d4dcbb4795020c435c /webkit/glue/plugins | |
parent | 6415176be8ad6b36d4adafa1c8e76aa89c5ca17c (diff) | |
download | chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.zip chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.gz chromium_src-e4be2dd25b1883bad7bed358e52e04f01c6e6f78.tar.bz2 |
Deinline even more destructors.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5794003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/pepper_class.h | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_plugin_object.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_group.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_group.h | 1 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_stream_url.cc | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_stream_url.h | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_2d_device_delegate.cc | 53 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_2d_device_delegate.h | 28 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_3d_device_delegate.cc | 110 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_3d_device_delegate.h | 60 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_audio_device_delegate.cc | 50 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_audio_device_delegate.h | 28 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate.cc | 40 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate.h | 14 |
14 files changed, 302 insertions, 98 deletions
diff --git a/webkit/glue/plugins/pepper_class.h b/webkit/glue/plugins/pepper_class.h index 35bd2c4..b2365a2 100644 --- a/webkit/glue/plugins/pepper_class.h +++ b/webkit/glue/plugins/pepper_class.h @@ -40,7 +40,7 @@ class VarObjectClass : public Resource { virtual ~VarObjectClass(); // Resource override. - virtual VarObjectClass* AsVarObjectClass() { return this; } + virtual VarObjectClass* AsVarObjectClass(); const PropertyMap &properties() const { return properties_; } diff --git a/webkit/glue/plugins/pepper_plugin_object.cc b/webkit/glue/plugins/pepper_plugin_object.cc index 2705809..47fbcaf 100644 --- a/webkit/glue/plugins/pepper_plugin_object.cc +++ b/webkit/glue/plugins/pepper_plugin_object.cc @@ -884,4 +884,8 @@ const PPB_Class* VarObjectClass::GetInterface() { // virtual VarObjectClass::~VarObjectClass() { } +VarObjectClass* VarObjectClass::AsVarObjectClass() { + return this; +} + } // namespace pepper diff --git a/webkit/glue/plugins/plugin_group.cc b/webkit/glue/plugins/plugin_group.cc index 723a31d..668621d 100644 --- a/webkit/glue/plugins/plugin_group.cc +++ b/webkit/glue/plugins/plugin_group.cc @@ -79,6 +79,8 @@ VersionRange& VersionRange::operator=(const VersionRange& other) { return *this; } +VersionRange::~VersionRange() {} + void VersionRange::InitFrom(const VersionRange& other) { low_str = other.low_str; high_str = other.high_str; diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/glue/plugins/plugin_group.h index e916b84..a771238 100644 --- a/webkit/glue/plugins/plugin_group.h +++ b/webkit/glue/plugins/plugin_group.h @@ -51,6 +51,7 @@ struct VersionRange { explicit VersionRange(VersionRangeDefinition definition); VersionRange(const VersionRange& other); VersionRange& operator=(const VersionRange& other); + ~VersionRange(); std::string low_str; std::string high_str; diff --git a/webkit/glue/plugins/plugin_stream_url.cc b/webkit/glue/plugins/plugin_stream_url.cc index a16845b..7f9f355 100644 --- a/webkit/glue/plugins/plugin_stream_url.cc +++ b/webkit/glue/plugins/plugin_stream_url.cc @@ -39,6 +39,10 @@ bool PluginStreamUrl::Close(NPReason reason) { return result; } +webkit_glue::WebPluginResourceClient* PluginStreamUrl::AsResourceClient() { + return static_cast<webkit_glue::WebPluginResourceClient*>(this); +} + void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) { if (notify_needed()) { // If the plugin participates in HTTP url redirect handling then notify it. diff --git a/webkit/glue/plugins/plugin_stream_url.h b/webkit/glue/plugins/plugin_stream_url.h index 3fdbe17..8642897 100644 --- a/webkit/glue/plugins/plugin_stream_url.h +++ b/webkit/glue/plugins/plugin_stream_url.h @@ -34,9 +34,7 @@ class PluginStreamUrl : public PluginStream, // it is still loading. virtual bool Close(NPReason reason); - virtual webkit_glue::WebPluginResourceClient* AsResourceClient() { - return static_cast<webkit_glue::WebPluginResourceClient*>(this); - } + virtual webkit_glue::WebPluginResourceClient* AsResourceClient(); virtual void CancelRequest(); diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.cc b/webkit/glue/plugins/webplugin_2d_device_delegate.cc new file mode 100644 index 0000000..f971e20 --- /dev/null +++ b/webkit/glue/plugins/webplugin_2d_device_delegate.cc @@ -0,0 +1,53 @@ +// 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. + +#include "webkit/glue/plugins/webplugin_2d_device_delegate.h" + +namespace webkit_glue { + +NPError WebPlugin2DDeviceDelegate::Device2DQueryCapability(int32 capability, + int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DQueryConfig( + const NPDeviceContext2DConfig* request, + NPDeviceContext2DConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DInitializeContext( + const NPDeviceContext2DConfig* config, + NPDeviceContext2D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DSetStateContext( + NPDeviceContext2D* context, + int32 state, + intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DGetStateContext( + NPDeviceContext2D* context, + int32 state, + intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DFlushContext( + NPP id, + NPDeviceContext2D* context, + NPDeviceFlushContextCallbackPtr callback, + void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin2DDeviceDelegate::Device2DDestroyContext( + NPDeviceContext2D* context) { + return NPERR_GENERIC_ERROR; +} + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.h b/webkit/glue/plugins/webplugin_2d_device_delegate.h index 69bd53a..e18c2fd 100644 --- a/webkit/glue/plugins/webplugin_2d_device_delegate.h +++ b/webkit/glue/plugins/webplugin_2d_device_delegate.h @@ -15,37 +15,23 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPlugin2DDeviceDelegate { public: - virtual NPError Device2DQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError Device2DQueryCapability(int32 capability, int32* value); virtual NPError Device2DQueryConfig(const NPDeviceContext2DConfig* request, - NPDeviceContext2DConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext2DConfig* obtain); virtual NPError Device2DInitializeContext( const NPDeviceContext2DConfig* config, - NPDeviceContext2D* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext2D* context); virtual NPError Device2DSetStateContext(NPDeviceContext2D* context, int32 state, - intptr_t value) { - return NPERR_GENERIC_ERROR; - } + intptr_t value); virtual NPError Device2DGetStateContext(NPDeviceContext2D* context, int32 state, - intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + intptr_t* value); virtual NPError Device2DFlushContext(NPP id, NPDeviceContext2D* context, NPDeviceFlushContextCallbackPtr callback, - void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device2DDestroyContext(NPDeviceContext2D* context) { - return NPERR_GENERIC_ERROR; - } + void* user_data); + virtual NPError Device2DDestroyContext(NPDeviceContext2D* context); protected: WebPlugin2DDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.cc b/webkit/glue/plugins/webplugin_3d_device_delegate.cc new file mode 100644 index 0000000..93dffa6 --- /dev/null +++ b/webkit/glue/plugins/webplugin_3d_device_delegate.cc @@ -0,0 +1,110 @@ +// 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. + +#include "webkit/glue/plugins/webplugin_3d_device_delegate.h" + +namespace webkit_glue { + +NPError WebPlugin3DDeviceDelegate::Device3DQueryCapability(int32 capability, + int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DQueryConfig( + const NPDeviceContext3DConfig* request, + NPDeviceContext3DConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DInitializeContext( + const NPDeviceContext3DConfig* config, + NPDeviceContext3D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DSetStateContext( + NPDeviceContext3D* context, + int32 state, + intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetStateContext( + NPDeviceContext3D* context, + int32 state, + intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DFlushContext( + NPP id, + NPDeviceContext3D* context, + NPDeviceFlushContextCallbackPtr callback, + void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DDestroyContext( + NPDeviceContext3D* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DCreateBuffer(NPDeviceContext3D* context, + size_t size, + int32* id) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DDestroyBuffer( + NPDeviceContext3D* context, + int32 id) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DMapBuffer(NPDeviceContext3D* context, + int32 id, + NPDeviceBuffer* buffer) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetNumConfigs(int32* num_configs) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DGetConfigAttribs( + int32 config, + int32* attrib_list) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DCreateContext( + int32 config, + const int32* attrib_list, + NPDeviceContext3D** context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DRegisterCallback( + NPP id, + NPDeviceContext* context, + int32 callback_type, + NPDeviceGenericCallbackPtr callback, + void* callback_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPlugin3DDeviceDelegate::Device3DSynchronizeContext( + NPP id, + NPDeviceContext3D* context, + NPDeviceSynchronizationMode mode, + const int32* input_attrib_list, + int32* output_attrib_list, + NPDeviceSynchronizeContextCallbackPtr callback, + void* callback_data) { + return NPERR_GENERIC_ERROR; +} + + +} // namespace webkit_glue + diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.h b/webkit/glue/plugins/webplugin_3d_device_delegate.h index fbb46eb..2f64b45 100644 --- a/webkit/glue/plugins/webplugin_3d_device_delegate.h +++ b/webkit/glue/plugins/webplugin_3d_device_delegate.h @@ -15,71 +15,43 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPlugin3DDeviceDelegate { public: - virtual NPError Device3DQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError Device3DQueryCapability(int32 capability, int32* value); virtual NPError Device3DQueryConfig(const NPDeviceContext3DConfig* request, - NPDeviceContext3DConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3DConfig* obtain); virtual NPError Device3DInitializeContext( const NPDeviceContext3DConfig* config, - NPDeviceContext3D* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3D* context); virtual NPError Device3DSetStateContext(NPDeviceContext3D* context, int32 state, - intptr_t value) { - return NPERR_GENERIC_ERROR; - } + intptr_t value); virtual NPError Device3DGetStateContext(NPDeviceContext3D* context, int32 state, - intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + intptr_t* value); virtual NPError Device3DFlushContext(NPP id, NPDeviceContext3D* context, NPDeviceFlushContextCallbackPtr callback, - void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device3DDestroyContext(NPDeviceContext3D* context) { - return NPERR_GENERIC_ERROR; - } + void* user_data); + virtual NPError Device3DDestroyContext(NPDeviceContext3D* context); virtual NPError Device3DCreateBuffer(NPDeviceContext3D* context, size_t size, - int32* id) { - return NPERR_GENERIC_ERROR; - } + int32* id); virtual NPError Device3DDestroyBuffer(NPDeviceContext3D* context, - int32 id) { - return NPERR_GENERIC_ERROR; - } + int32 id); virtual NPError Device3DMapBuffer(NPDeviceContext3D* context, int32 id, - NPDeviceBuffer* buffer) { - return NPERR_GENERIC_ERROR; - } - virtual NPError Device3DGetNumConfigs(int32* num_configs) { - return NPERR_GENERIC_ERROR; - } + NPDeviceBuffer* buffer); + virtual NPError Device3DGetNumConfigs(int32* num_configs); virtual NPError Device3DGetConfigAttribs(int32 config, - int32* attrib_list) { - return NPERR_GENERIC_ERROR; - } + int32* attrib_list); virtual NPError Device3DCreateContext(int32 config, const int32* attrib_list, - NPDeviceContext3D** context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContext3D** context); virtual NPError Device3DRegisterCallback( NPP id, NPDeviceContext* context, int32 callback_type, NPDeviceGenericCallbackPtr callback, - void* callback_data) { - return NPERR_GENERIC_ERROR; - } + void* callback_data); virtual NPError Device3DSynchronizeContext( NPP id, NPDeviceContext3D* context, @@ -87,9 +59,7 @@ class WebPlugin3DDeviceDelegate { const int32* input_attrib_list, int32* output_attrib_list, NPDeviceSynchronizeContextCallbackPtr callback, - void* callback_data) { - return NPERR_GENERIC_ERROR; - } + void* callback_data); protected: WebPlugin3DDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.cc b/webkit/glue/plugins/webplugin_audio_device_delegate.cc new file mode 100644 index 0000000..8cc3d62 --- /dev/null +++ b/webkit/glue/plugins/webplugin_audio_device_delegate.cc @@ -0,0 +1,50 @@ +// 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. + +#include "webkit/glue/plugins/webplugin_audio_device_delegate.h" + +namespace webkit_glue { + +NPError WebPluginAudioDeviceDelegate::DeviceAudioQueryCapability( + int32 capability, int32* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioQueryConfig( + const NPDeviceContextAudioConfig* request, + NPDeviceContextAudioConfig* obtain) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioInitializeContext( + const NPDeviceContextAudioConfig* config, + NPDeviceContextAudio* context) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioSetStateContext( + NPDeviceContextAudio* context, + int32 state, intptr_t value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioGetStateContext( + NPDeviceContextAudio* context, + int32 state, intptr_t* value) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioFlushContext( + NPP id, NPDeviceContextAudio* context, + NPDeviceFlushContextCallbackPtr callback, void* user_data) { + return NPERR_GENERIC_ERROR; +} + +NPError WebPluginAudioDeviceDelegate::DeviceAudioDestroyContext( + NPDeviceContextAudio* context) { + return NPERR_GENERIC_ERROR; +} + + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.h b/webkit/glue/plugins/webplugin_audio_device_delegate.h index 3f37246..de85433 100644 --- a/webkit/glue/plugins/webplugin_audio_device_delegate.h +++ b/webkit/glue/plugins/webplugin_audio_device_delegate.h @@ -15,35 +15,21 @@ namespace webkit_glue { // "regular" plugin delegate while being overridden by the "pepper" one. class WebPluginAudioDeviceDelegate { public: - virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value) { - return NPERR_GENERIC_ERROR; - } + virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value); virtual NPError DeviceAudioQueryConfig( const NPDeviceContextAudioConfig* request, - NPDeviceContextAudioConfig* obtain) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContextAudioConfig* obtain); virtual NPError DeviceAudioInitializeContext( const NPDeviceContextAudioConfig* config, - NPDeviceContextAudio* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceContextAudio* context); virtual NPError DeviceAudioSetStateContext(NPDeviceContextAudio* context, - int32 state, intptr_t value) { - return NPERR_GENERIC_ERROR; - } + int32 state, intptr_t value); virtual NPError DeviceAudioGetStateContext(NPDeviceContextAudio* context, - int32 state, intptr_t* value) { - return NPERR_GENERIC_ERROR; - } + int32 state, intptr_t* value); virtual NPError DeviceAudioFlushContext( NPP id, NPDeviceContextAudio* context, - NPDeviceFlushContextCallbackPtr callback, void* user_data) { - return NPERR_GENERIC_ERROR; - } - virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context) { - return NPERR_GENERIC_ERROR; - } + NPDeviceFlushContextCallbackPtr callback, void* user_data); + virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context); protected: WebPluginAudioDeviceDelegate() {} diff --git a/webkit/glue/plugins/webplugin_delegate.cc b/webkit/glue/plugins/webplugin_delegate.cc new file mode 100644 index 0000000..c3fb53b --- /dev/null +++ b/webkit/glue/plugins/webplugin_delegate.cc @@ -0,0 +1,40 @@ +// 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. + +#include "webkit/glue/plugins/webplugin_delegate.h" + +namespace webkit_glue { + +bool WebPluginDelegate::StartFind(const string16& search_text, + bool case_sensitive, + int identifier) { + return false; +} + +NPWidgetExtensions* WebPluginDelegate::GetWidgetExtensions() { + return NULL; +} + +bool WebPluginDelegate::SetCursor(NPCursorType type) { + return false; +} + +NPFontExtensions* WebPluginDelegate::GetFontExtensions() { + return NULL; +} + +bool WebPluginDelegate::HasSelection() const { + return false; +} + +string16 WebPluginDelegate::GetSelectionAsText() const { + return string16(); +} + +string16 WebPluginDelegate::GetSelectionAsMarkup() const { + return string16(); +} + + +} // namespace webkit_glue diff --git a/webkit/glue/plugins/webplugin_delegate.h b/webkit/glue/plugins/webplugin_delegate.h index 901cdea..ac7bb5c 100644 --- a/webkit/glue/plugins/webplugin_delegate.h +++ b/webkit/glue/plugins/webplugin_delegate.h @@ -143,22 +143,22 @@ class WebPluginDelegate : public WebPlugin2DDeviceDelegate, // See WebPluginContainerImpl's description of the interface. virtual bool StartFind(const string16& search_text, bool case_sensitive, - int identifier) { return false; } + int identifier); virtual void SelectFindResult(bool forward) {} virtual void StopFind() {} virtual void NumberOfFindResultsChanged(int total, bool final_result) {} virtual void SelectedFindResultChanged(int index) {} - virtual NPWidgetExtensions* GetWidgetExtensions() { return NULL; } - virtual bool SetCursor(NPCursorType type) { return false; } - virtual NPFontExtensions* GetFontExtensions() { return NULL; } + virtual NPWidgetExtensions* GetWidgetExtensions(); + virtual bool SetCursor(NPCursorType type); + virtual NPFontExtensions* GetFontExtensions(); // Used for zooming of full page plugins. 0 means reset, while -1 means zoom // out and +1 means zoom in. virtual void SetZoomFactor(float scale, bool text_only) {} // Gets the selected text, if any. - virtual bool HasSelection() const { return false; } - virtual string16 GetSelectionAsText() const { return string16(); } - virtual string16 GetSelectionAsMarkup() const { return string16(); } + virtual bool HasSelection() const; + virtual string16 GetSelectionAsText() const; + virtual string16 GetSelectionAsMarkup() const; }; } // namespace webkit_glue |