diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 05:53:23 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 05:53:23 +0000 |
commit | 8a3b796aa8160ddaed478224050a2b7e1b16d9e6 (patch) | |
tree | d23ba1b25c4bcbd425522268951ad8af4a7cc1c7 /chrome/common/plugin_messages.h | |
parent | 79dbc66fba17d6b4967fe86a577b11d15548cdec (diff) | |
download | chromium_src-8a3b796aa8160ddaed478224050a2b7e1b16d9e6.zip chromium_src-8a3b796aa8160ddaed478224050a2b7e1b16d9e6.tar.gz chromium_src-8a3b796aa8160ddaed478224050a2b7e1b16d9e6.tar.bz2 |
This changelist fixes some issues with the NPAPI WMP plugin work in Chrome. The first is that we need to disable windowless mode since it doesn't work in the NPAPI plugin (Safari does this as well, and sites don't use windowless for Firefox). The second is to make UpdateGeometry message synchronous for WMP. The problem I saw was that while handling that message, the plugin might disaptch a NPObject Invoke method to play a video, which WMP doesn't expect and it leads to the video never playing.
While touching these files, I made some small cleanup by reverting the change that made WebPluginProxy not have a WebPluginDelegateImpl pointer, which added a bunch of unnecessary methods to WebPluginDelegate.
BUG=20259
TEST=use --no-activex and try playing the videos on http://www.nana10.co.il/Section/?SectionID=10847&sid=235
Review URL: http://codereview.chromium.org/196012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages.h')
-rw-r--r-- | chrome/common/plugin_messages.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h index 662f60a..142450c 100644 --- a/chrome/common/plugin_messages.h +++ b/chrome/common/plugin_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 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. @@ -102,6 +102,13 @@ struct NPVariant_Param { intptr_t npobject_pointer; }; +struct PluginMsg_UpdateGeometry_Param { + gfx::Rect window_rect; + gfx::Rect clip_rect; + TransportDIB::Handle windowless_buffer; + TransportDIB::Handle background_buffer; +}; + namespace IPC { @@ -407,6 +414,39 @@ struct ParamTraits<NPVariant_Param> { } }; +// For windowless plugins, windowless_buffer +// contains a buffer that the plugin draws into. background_buffer is used +// for transparent windowless plugins, and holds the background of the plugin +// rectangle. +template <> +struct ParamTraits<PluginMsg_UpdateGeometry_Param> { + typedef PluginMsg_UpdateGeometry_Param param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.window_rect); + WriteParam(m, p.clip_rect); + WriteParam(m, p.windowless_buffer); + WriteParam(m, p.background_buffer); + } + static bool Read(const Message* m, void** iter, param_type* r) { + return + ReadParam(m, iter, &r->window_rect) && + ReadParam(m, iter, &r->clip_rect) && + ReadParam(m, iter, &r->windowless_buffer) && + ReadParam(m, iter, &r->background_buffer); + } + static void Log(const param_type& p, std::wstring* l) { + l->append(L"("); + LogParam(p.window_rect, l); + l->append(L", "); + LogParam(p.clip_rect, l); + l->append(L", "); + LogParam(p.windowless_buffer, l); + l->append(L", "); + LogParam(p.background_buffer, l); + l->append(L")"); + } +}; + } // namespace IPC |