2009-06-30 11:51:05 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: sw=4 ts=4 et :
|
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Plugin App.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Chris Jones <jones.chris.g@gmail.com>
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
2009-09-08 23:31:35 -07:00
|
|
|
#ifndef dom_plugins_PluginInstanceParent_h
|
|
|
|
#define dom_plugins_PluginInstanceParent_h 1
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2009-09-09 15:59:06 -07:00
|
|
|
#include "mozilla/plugins/PPluginInstanceParent.h"
|
2009-09-08 23:31:35 -07:00
|
|
|
#include "mozilla/plugins/PluginScriptableObjectParent.h"
|
2009-12-01 13:05:26 -08:00
|
|
|
#if defined(OS_WIN)
|
|
|
|
#include "mozilla/gfx/SharedDIBWin.h"
|
2011-06-25 08:25:03 -07:00
|
|
|
#elif defined(MOZ_WIDGET_COCOA)
|
2010-04-20 07:52:19 -07:00
|
|
|
#include "nsCoreAnimationSupport.h"
|
2009-12-01 13:05:26 -08:00
|
|
|
#endif
|
2009-06-30 11:51:05 -07:00
|
|
|
|
|
|
|
#include "npfunctions.h"
|
2009-09-23 00:12:52 -07:00
|
|
|
#include "nsAutoPtr.h"
|
2010-01-15 12:35:57 -08:00
|
|
|
#include "nsDataHashtable.h"
|
|
|
|
#include "nsHashKeys.h"
|
2009-12-01 13:05:26 -08:00
|
|
|
#include "nsRect.h"
|
2010-09-15 09:02:49 -07:00
|
|
|
#include "gfxASurface.h"
|
2011-02-12 08:07:10 -08:00
|
|
|
#include "ImageLayers.h"
|
2010-09-15 09:02:49 -07:00
|
|
|
#ifdef MOZ_X11
|
|
|
|
class gfxXlibSurface;
|
|
|
|
#endif
|
2011-08-29 09:26:24 -07:00
|
|
|
#include "nsGUIEvent.h"
|
2009-06-30 11:51:05 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace plugins {
|
|
|
|
|
2009-09-09 15:59:06 -07:00
|
|
|
class PBrowserStreamParent;
|
2009-09-23 00:48:28 -07:00
|
|
|
class PluginModuleParent;
|
2009-08-18 13:20:03 -07:00
|
|
|
|
2009-09-09 15:59:06 -07:00
|
|
|
class PluginInstanceParent : public PPluginInstanceParent
|
2009-06-30 11:51:05 -07:00
|
|
|
{
|
2009-09-08 23:31:35 -07:00
|
|
|
friend class PluginModuleParent;
|
2009-09-09 07:04:09 -07:00
|
|
|
friend class BrowserStreamParent;
|
2009-09-21 07:51:35 -07:00
|
|
|
friend class PluginStreamParent;
|
2011-01-05 11:44:21 -08:00
|
|
|
friend class StreamNotifyParent;
|
2009-08-18 13:20:03 -07:00
|
|
|
|
2009-06-30 11:51:05 -07:00
|
|
|
public:
|
2009-09-23 00:12:52 -07:00
|
|
|
PluginInstanceParent(PluginModuleParent* parent,
|
|
|
|
NPP npp,
|
2010-04-20 07:52:19 -07:00
|
|
|
const nsCString& mimeType,
|
2009-09-23 00:12:52 -07:00
|
|
|
const NPNetscapeFuncs* npniface);
|
|
|
|
|
|
|
|
virtual ~PluginInstanceParent();
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2010-01-15 12:35:57 -08:00
|
|
|
bool Init();
|
|
|
|
NPError Destroy();
|
2009-10-07 16:50:48 -07:00
|
|
|
|
2010-01-27 16:01:44 -08:00
|
|
|
NS_OVERRIDE virtual void ActorDestroy(ActorDestroyReason why);
|
|
|
|
|
2009-09-09 15:59:06 -07:00
|
|
|
virtual PPluginScriptableObjectParent*
|
2009-09-22 10:31:11 -07:00
|
|
|
AllocPPluginScriptableObject();
|
2009-08-10 16:28:22 -07:00
|
|
|
|
2010-03-04 13:20:14 -08:00
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectParent* aActor);
|
2009-09-08 23:31:35 -07:00
|
|
|
|
2009-09-23 00:12:52 -07:00
|
|
|
virtual bool
|
|
|
|
DeallocPPluginScriptableObject(PPluginScriptableObjectParent* aObject);
|
2009-09-09 15:59:06 -07:00
|
|
|
virtual PBrowserStreamParent*
|
2009-09-22 10:31:11 -07:00
|
|
|
AllocPBrowserStream(const nsCString& url,
|
|
|
|
const uint32_t& length,
|
|
|
|
const uint32_t& lastmodified,
|
2009-10-16 16:31:53 -07:00
|
|
|
PStreamNotifyParent* notifyData,
|
2009-09-22 10:31:11 -07:00
|
|
|
const nsCString& headers,
|
|
|
|
const nsCString& mimeType,
|
|
|
|
const bool& seekable,
|
|
|
|
NPError* rv,
|
|
|
|
uint16_t *stype);
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-12-03 00:16:14 -08:00
|
|
|
DeallocPBrowserStream(PBrowserStreamParent* stream);
|
2009-08-18 13:20:03 -07:00
|
|
|
|
2009-09-21 07:51:35 -07:00
|
|
|
virtual PPluginStreamParent*
|
2009-09-22 10:31:11 -07:00
|
|
|
AllocPPluginStream(const nsCString& mimeType,
|
|
|
|
const nsCString& target,
|
|
|
|
NPError* result);
|
2009-09-21 07:51:35 -07:00
|
|
|
virtual bool
|
2009-12-03 00:16:14 -08:00
|
|
|
DeallocPPluginStream(PPluginStreamParent* stream);
|
2009-09-21 07:51:35 -07:00
|
|
|
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-15 13:33:24 -07:00
|
|
|
AnswerNPN_GetValue_NPNVjavascriptEnabledBool(bool* value, NPError* result);
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-15 13:33:24 -07:00
|
|
|
AnswerNPN_GetValue_NPNVisOfflineBool(bool* value, NPError* result);
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2010-01-14 07:18:34 -08:00
|
|
|
AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* value,
|
|
|
|
NPError* result);
|
2010-01-13 17:47:38 -08:00
|
|
|
virtual bool
|
2009-09-15 13:33:24 -07:00
|
|
|
AnswerNPN_GetValue_NPNVWindowNPObject(
|
|
|
|
PPluginScriptableObjectParent** value,
|
|
|
|
NPError* result);
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-15 13:33:24 -07:00
|
|
|
AnswerNPN_GetValue_NPNVPluginElementNPObject(
|
|
|
|
PPluginScriptableObjectParent** value,
|
|
|
|
NPError* result);
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-15 13:33:24 -07:00
|
|
|
AnswerNPN_GetValue_NPNVprivateModeBool(bool* value, NPError* result);
|
2011-09-14 09:22:27 -07:00
|
|
|
|
|
|
|
virtual bool
|
|
|
|
AnswerNPN_GetValue_NPNVdocumentOrigin(nsCString* value, NPError* result);
|
2009-09-15 13:33:24 -07:00
|
|
|
|
2009-09-24 19:03:59 -07:00
|
|
|
virtual bool
|
|
|
|
AnswerNPN_SetValue_NPPVpluginWindow(const bool& windowed, NPError* result);
|
|
|
|
virtual bool
|
|
|
|
AnswerNPN_SetValue_NPPVpluginTransparent(const bool& transparent,
|
|
|
|
NPError* result);
|
2010-03-26 13:07:37 -07:00
|
|
|
virtual bool
|
2011-04-08 12:58:04 -07:00
|
|
|
AnswerNPN_SetValue_NPPVpluginUsesDOMForCursor(const bool& useDOMForCursor,
|
|
|
|
NPError* result);
|
|
|
|
virtual bool
|
2010-03-26 13:07:37 -07:00
|
|
|
AnswerNPN_SetValue_NPPVpluginDrawingModel(const int& drawingModel,
|
|
|
|
NPError* result);
|
|
|
|
virtual bool
|
|
|
|
AnswerNPN_SetValue_NPPVpluginEventModel(const int& eventModel,
|
|
|
|
NPError* result);
|
2009-09-24 19:03:59 -07:00
|
|
|
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-08 14:22:50 -07:00
|
|
|
AnswerNPN_GetURL(const nsCString& url, const nsCString& target,
|
|
|
|
NPError *result);
|
|
|
|
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-09-08 14:22:50 -07:00
|
|
|
AnswerNPN_PostURL(const nsCString& url, const nsCString& target,
|
|
|
|
const nsCString& buffer, const bool& file,
|
|
|
|
NPError* result);
|
|
|
|
|
|
|
|
virtual PStreamNotifyParent*
|
2009-09-22 10:31:11 -07:00
|
|
|
AllocPStreamNotify(const nsCString& url, const nsCString& target,
|
|
|
|
const bool& post, const nsCString& buffer,
|
|
|
|
const bool& file,
|
|
|
|
NPError* result);
|
2009-09-08 14:22:50 -07:00
|
|
|
|
2009-11-25 06:26:01 -08:00
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
AnswerPStreamNotifyConstructor(PStreamNotifyParent* actor,
|
|
|
|
const nsCString& url,
|
|
|
|
const nsCString& target,
|
|
|
|
const bool& post, const nsCString& buffer,
|
|
|
|
const bool& file,
|
|
|
|
NPError* result);
|
|
|
|
|
2009-09-17 16:09:20 -07:00
|
|
|
virtual bool
|
2009-12-03 00:16:14 -08:00
|
|
|
DeallocPStreamNotify(PStreamNotifyParent* notifyData);
|
2009-09-08 14:22:50 -07:00
|
|
|
|
2009-09-30 21:09:21 -07:00
|
|
|
virtual bool
|
|
|
|
RecvNPN_InvalidateRect(const NPRect& rect);
|
|
|
|
|
2010-09-15 09:02:44 -07:00
|
|
|
// Async rendering
|
|
|
|
virtual bool
|
|
|
|
RecvShow(const NPRect& updatedRect,
|
|
|
|
const SurfaceDescriptor& newSurface,
|
|
|
|
SurfaceDescriptor* prevSurface);
|
|
|
|
|
2011-01-27 14:37:00 -08:00
|
|
|
virtual PPluginSurfaceParent*
|
|
|
|
AllocPPluginSurface(const WindowsSharedMemoryHandle& handle,
|
|
|
|
const gfxIntSize& size,
|
|
|
|
const bool& transparent);
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPPluginSurface(PPluginSurfaceParent* s);
|
|
|
|
|
2009-10-13 10:54:41 -07:00
|
|
|
virtual bool
|
2010-03-25 16:45:33 -07:00
|
|
|
AnswerNPN_PushPopupsEnabledState(const bool& aState);
|
2009-10-13 10:54:41 -07:00
|
|
|
|
|
|
|
virtual bool
|
2010-03-25 16:45:33 -07:00
|
|
|
AnswerNPN_PopPopupsEnabledState();
|
2009-10-13 10:54:41 -07:00
|
|
|
|
2010-01-15 08:26:46 -08:00
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
AnswerNPN_GetValueForURL(const NPNURLVariable& variable,
|
|
|
|
const nsCString& url,
|
|
|
|
nsCString* value, NPError* result);
|
|
|
|
|
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
AnswerNPN_SetValueForURL(const NPNURLVariable& variable,
|
|
|
|
const nsCString& url,
|
|
|
|
const nsCString& value, NPError* result);
|
|
|
|
|
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
AnswerNPN_GetAuthenticationInfo(const nsCString& protocol,
|
|
|
|
const nsCString& host,
|
|
|
|
const int32_t& port,
|
|
|
|
const nsCString& scheme,
|
|
|
|
const nsCString& realm,
|
|
|
|
nsCString* username,
|
|
|
|
nsCString* password,
|
|
|
|
NPError* result);
|
|
|
|
|
2010-03-26 13:55:56 -07:00
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
AnswerNPN_ConvertPoint(const double& sourceX,
|
2010-05-20 12:22:54 -07:00
|
|
|
const bool& ignoreDestX,
|
2010-03-26 13:55:56 -07:00
|
|
|
const double& sourceY,
|
2010-05-20 12:22:54 -07:00
|
|
|
const bool& ignoreDestY,
|
2010-03-26 13:55:56 -07:00
|
|
|
const NPCoordinateSpace& sourceSpace,
|
|
|
|
const NPCoordinateSpace& destSpace,
|
|
|
|
double *destX,
|
|
|
|
double *destY,
|
|
|
|
bool *result);
|
|
|
|
|
2011-02-03 09:31:01 -08:00
|
|
|
NS_OVERRIDE virtual bool
|
|
|
|
RecvNegotiatedCarbon();
|
|
|
|
|
2009-09-30 14:36:14 -07:00
|
|
|
NPError NPP_SetWindow(const NPWindow* aWindow);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2010-01-19 19:23:35 -08:00
|
|
|
NPError NPP_GetValue(NPPVariable variable, void* retval);
|
|
|
|
NPError NPP_SetValue(NPNVariable variable, void* value);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2011-01-05 11:44:21 -08:00
|
|
|
void NPP_URLRedirectNotify(const char* url, int32_t status,
|
|
|
|
void* notifyData);
|
|
|
|
|
2009-06-30 11:51:05 -07:00
|
|
|
NPError NPP_NewStream(NPMIMEType type, NPStream* stream,
|
2009-08-18 13:20:03 -07:00
|
|
|
NPBool seekable, uint16_t* stype);
|
|
|
|
NPError NPP_DestroyStream(NPStream* stream, NPReason reason);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2010-01-19 19:23:35 -08:00
|
|
|
void NPP_Print(NPPrint* platformPrint);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2009-09-18 18:19:11 -07:00
|
|
|
int16_t NPP_HandleEvent(void* event);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2009-09-22 14:06:00 -07:00
|
|
|
void NPP_URLNotify(const char* url, NPReason reason, void* notifyData);
|
2009-06-30 11:51:05 -07:00
|
|
|
|
2009-10-27 12:51:12 -07:00
|
|
|
PluginModuleParent* Module()
|
2009-09-23 00:12:52 -07:00
|
|
|
{
|
|
|
|
return mParent;
|
|
|
|
}
|
|
|
|
|
2009-10-07 16:50:48 -07:00
|
|
|
const NPNetscapeFuncs* GetNPNIface()
|
|
|
|
{
|
|
|
|
return mNPNIface;
|
|
|
|
}
|
|
|
|
|
2010-01-15 12:35:57 -08:00
|
|
|
bool
|
|
|
|
RegisterNPObjectForActor(NPObject* aObject,
|
|
|
|
PluginScriptableObjectParent* aActor);
|
|
|
|
|
|
|
|
void
|
|
|
|
UnregisterNPObject(NPObject* aObject);
|
|
|
|
|
2009-10-07 16:50:48 -07:00
|
|
|
PluginScriptableObjectParent*
|
|
|
|
GetActorForNPObject(NPObject* aObject);
|
|
|
|
|
|
|
|
NPP
|
|
|
|
GetNPP()
|
|
|
|
{
|
|
|
|
return mNPP;
|
|
|
|
}
|
|
|
|
|
2010-01-26 13:40:15 -08:00
|
|
|
virtual bool
|
2010-06-23 10:08:56 -07:00
|
|
|
AnswerPluginFocusChange(const bool& gotFocus);
|
2010-01-26 13:40:15 -08:00
|
|
|
|
2010-09-10 11:28:52 -07:00
|
|
|
nsresult AsyncSetWindow(NPWindow* window);
|
2012-02-08 07:34:27 -08:00
|
|
|
nsresult GetImageContainer(mozilla::layers::ImageContainer** aContainer);
|
2011-02-22 21:38:09 -08:00
|
|
|
nsresult GetImageSize(nsIntSize* aSize);
|
2011-06-30 09:46:26 -07:00
|
|
|
#ifdef XP_MACOSX
|
2011-09-28 23:19:26 -07:00
|
|
|
nsresult IsRemoteDrawingCoreAnimation(bool *aDrawing);
|
2011-06-30 09:46:26 -07:00
|
|
|
#endif
|
2011-02-16 14:43:31 -08:00
|
|
|
nsresult SetBackgroundUnknown();
|
2011-02-16 14:43:31 -08:00
|
|
|
nsresult BeginUpdateBackground(const nsIntRect& aRect,
|
2011-02-16 14:43:31 -08:00
|
|
|
gfxContext** aCtx);
|
2011-02-16 14:43:31 -08:00
|
|
|
nsresult EndUpdateBackground(gfxContext* aCtx,
|
2011-02-16 14:43:31 -08:00
|
|
|
const nsIntRect& aRect);
|
2011-08-29 09:26:24 -07:00
|
|
|
#if defined(MOZ_WIDGET_QT) && (MOZ_PLATFORM_MAEMO == 6)
|
|
|
|
nsresult HandleGUIEvent(const nsGUIEvent& anEvent, bool* handled);
|
|
|
|
#endif
|
2010-09-10 11:28:52 -07:00
|
|
|
|
2009-10-07 16:50:48 -07:00
|
|
|
private:
|
2011-02-16 14:43:31 -08:00
|
|
|
// Create an appropriate platform surface for a background of size
|
|
|
|
// |aSize|. Return true if successful.
|
|
|
|
bool CreateBackground(const nsIntSize& aSize);
|
|
|
|
void DestroyBackground();
|
|
|
|
SurfaceDescriptor BackgroundDescriptor() /*const*/;
|
|
|
|
|
2012-02-08 07:34:27 -08:00
|
|
|
typedef mozilla::layers::ImageContainer ImageContainer;
|
|
|
|
ImageContainer *GetImageContainer();
|
|
|
|
|
2011-02-16 14:43:31 -08:00
|
|
|
NS_OVERRIDE
|
|
|
|
virtual PPluginBackgroundDestroyerParent*
|
|
|
|
AllocPPluginBackgroundDestroyer();
|
|
|
|
|
|
|
|
NS_OVERRIDE
|
|
|
|
virtual bool
|
|
|
|
DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerParent* aActor);
|
|
|
|
|
2009-10-07 16:50:48 -07:00
|
|
|
bool InternalGetValueForNPObject(NPNVariable aVariable,
|
|
|
|
PPluginScriptableObjectParent** aValue,
|
|
|
|
NPError* aResult);
|
|
|
|
|
2009-06-30 11:51:05 -07:00
|
|
|
private:
|
2009-09-23 00:12:52 -07:00
|
|
|
PluginModuleParent* mParent;
|
2009-08-18 13:20:03 -07:00
|
|
|
NPP mNPP;
|
2009-06-30 11:51:05 -07:00
|
|
|
const NPNetscapeFuncs* mNPNIface;
|
2009-12-01 13:05:26 -08:00
|
|
|
NPWindowType mWindowType;
|
2009-09-23 00:12:52 -07:00
|
|
|
|
2010-01-15 12:35:57 -08:00
|
|
|
nsDataHashtable<nsVoidPtrHashKey, PluginScriptableObjectParent*> mScriptableObjects;
|
2009-12-01 13:05:26 -08:00
|
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
private:
|
|
|
|
// Used in rendering windowless plugins in other processes.
|
|
|
|
bool SharedSurfaceSetWindow(const NPWindow* aWindow, NPRemoteWindow& aRemoteWindow);
|
2009-12-14 16:27:25 -08:00
|
|
|
void SharedSurfaceBeforePaint(RECT &rect, NPRemoteEvent& npremoteevent);
|
2009-12-01 13:05:26 -08:00
|
|
|
void SharedSurfaceAfterPaint(NPEvent* npevent);
|
|
|
|
void SharedSurfaceRelease();
|
2010-01-26 13:40:15 -08:00
|
|
|
// Used in handling parent/child forwarding of events.
|
|
|
|
static LRESULT CALLBACK PluginWindowHookProc(HWND hWnd, UINT message,
|
|
|
|
WPARAM wParam, LPARAM lParam);
|
|
|
|
void SubclassPluginWindow(HWND aWnd);
|
|
|
|
void UnsubclassPluginWindow();
|
2009-12-01 13:05:26 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
gfx::SharedDIBWin mSharedSurfaceDib;
|
|
|
|
nsIntRect mPluginPort;
|
|
|
|
nsIntRect mSharedSize;
|
2010-01-26 13:40:15 -08:00
|
|
|
HWND mPluginHWND;
|
|
|
|
WNDPROC mPluginWndProc;
|
2010-02-09 14:34:38 -08:00
|
|
|
bool mNestedEventState;
|
2009-12-01 13:05:26 -08:00
|
|
|
#endif // defined(XP_WIN)
|
2011-06-25 08:25:03 -07:00
|
|
|
#if defined(MOZ_WIDGET_COCOA)
|
2010-03-26 13:07:37 -07:00
|
|
|
private:
|
2011-05-19 14:08:14 -07:00
|
|
|
Shmem mShSurface;
|
2011-08-15 10:07:40 -07:00
|
|
|
uint16_t mShWidth;
|
|
|
|
uint16_t mShHeight;
|
2011-05-19 14:08:14 -07:00
|
|
|
CGColorSpaceRef mShColorSpace;
|
|
|
|
int16_t mDrawingModel;
|
2011-07-12 07:31:18 -07:00
|
|
|
nsRefPtr<nsIOSurface> mIOSurface;
|
|
|
|
nsRefPtr<nsIOSurface> mFrontIOSurface;
|
2011-06-25 08:25:03 -07:00
|
|
|
#endif // definied(MOZ_WIDGET_COCOA)
|
2010-09-15 09:02:49 -07:00
|
|
|
|
|
|
|
// ObjectFrame layer wrapper
|
|
|
|
nsRefPtr<gfxASurface> mFrontSurface;
|
2011-02-16 14:43:31 -08:00
|
|
|
// For windowless+transparent instances, this surface contains a
|
|
|
|
// "pretty recent" copy of the pixels under its <object> frame.
|
|
|
|
// On the plugin side, we use this surface to avoid doing alpha
|
|
|
|
// recovery when possible. This surface is created and owned by
|
|
|
|
// the browser, but a "read-only" reference is sent to the plugin.
|
|
|
|
//
|
|
|
|
// We have explicitly chosen not to provide any guarantees about
|
|
|
|
// the consistency of the pixels in |mBackground|. A plugin may
|
|
|
|
// be able to observe partial updates to the background.
|
|
|
|
nsRefPtr<gfxASurface> mBackground;
|
2012-02-08 07:34:27 -08:00
|
|
|
|
|
|
|
nsRefPtr<ImageContainer> mImageContainer;
|
2009-06-30 11:51:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace plugins
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2009-09-08 23:31:35 -07:00
|
|
|
#endif // ifndef dom_plugins_PluginInstanceParent_h
|