diff options
author | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 04:36:05 +0000 |
---|---|---|
committer | craig.schlenter@chromium.org <craig.schlenter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 04:36:05 +0000 |
commit | 4c66d2a859776c05767f05472cbfa9519ca01aff (patch) | |
tree | 4ba514f08aedb79783bc19e7c31ca1de82552ea7 /webkit | |
parent | 0b330bf9a3164dc61ce4b88c386e44c36e7bfa60 (diff) | |
download | chromium_src-4c66d2a859776c05767f05472cbfa9519ca01aff.zip chromium_src-4c66d2a859776c05767f05472cbfa9519ca01aff.tar.gz chromium_src-4c66d2a859776c05767f05472cbfa9519ca01aff.tar.bz2 |
Linux: fix compilation error with gcc 4.5.
Avoid a gcc 4.5 warning/error for values that aren't part
of NPNVariable. Also drop some unnecessary static_casts by
swapping from an int to a size_t in TemplateURLRef's
Replacement struct and use platform specific NULL or 0
constants in a couple of places.
BUG=43341
TEST=chrome target compiles with gcc 4.5.
Review URL: http://codereview.chromium.org/2019002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 2 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_impl.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 41d2fa2..a6e0fde 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -656,7 +656,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { NPError rv = NPERR_GENERIC_ERROR; - switch (variable) { + switch (static_cast<int>(variable)) { case NPNVWindowNPObject: { scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); NPObject *np_object = plugin->webplugin()->GetWindowScriptNPObject(); diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/glue/plugins/webplugin_impl.cc index 8a0e75e..693232b 100644 --- a/webkit/glue/plugins/webplugin_impl.cc +++ b/webkit/glue/plugins/webplugin_impl.cc @@ -412,7 +412,7 @@ WebPluginImpl::WebPluginImpl( WebFrame* webframe, const WebPluginParams& params, const base::WeakPtr<WebPluginPageDelegate>& page_delegate) : windowless_(false), - window_(0), + window_(gfx::kNullPluginWindow), accepts_input_events_(false), page_delegate_(page_delegate), webframe_(webframe), @@ -473,7 +473,7 @@ void WebPluginImpl::SetWindow(gfx::PluginWindowHandle window) { void WebPluginImpl::WillDestroyWindow(gfx::PluginWindowHandle window) { DCHECK_EQ(window, window_); - window_ = 0; + window_ = gfx::kNullPluginWindow; if (page_delegate_) page_delegate_->WillDestroyPluginWindow(window); } |