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"
|
2010-04-20 07:52:19 -07:00
|
|
|
#elif defined(OS_MACOSX)
|
|
|
|
#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
|
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);
|
|
|
|
|
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-04-20 07:52:19 -07:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
void Invalidate();
|
|
|
|
#endif // definied(OS_MACOSX)
|
|
|
|
|
2010-09-10 11:28:52 -07:00
|
|
|
nsresult AsyncSetWindow(NPWindow* window);
|
2011-02-12 08:07:10 -08:00
|
|
|
nsresult GetImage(mozilla::layers::ImageContainer* aContainer, mozilla::layers::Image** aImage);
|
2011-02-22 21:38:09 -08:00
|
|
|
nsresult GetImageSize(nsIntSize* aSize);
|
2011-02-12 07:55:40 -08:00
|
|
|
#ifdef XP_MACOSX
|
|
|
|
nsresult IsRemoteDrawingCoreAnimation(PRBool *aDrawing);
|
|
|
|
#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);
|
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*/;
|
|
|
|
|
|
|
|
NS_OVERRIDE
|
|
|
|
virtual PPluginBackgroundDestroyerParent*
|
|
|
|
AllocPPluginBackgroundDestroyer();
|
|
|
|
|
|
|
|
NS_OVERRIDE
|
|
|
|
virtual bool
|
|
|
|
DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerParent* aActor);
|
|
|
|
|
2010-04-20 07:52:19 -07:00
|
|
|
// Quirks mode support for various plugin mime types
|
|
|
|
enum PluginQuirks {
|
|
|
|
// OSX: Don't use the refresh timer for plug-ins
|
|
|
|
// using this quirk. These plug-in most have another
|
|
|
|
// way to refresh the window.
|
|
|
|
COREANIMATION_REFRESH_TIMER = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
void InitQuirksModes(const nsCString& aMimeType);
|
|
|
|
|
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;
|
2010-04-20 07:52:19 -07:00
|
|
|
int mQuirks;
|
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;
|
2011-05-18 04:57:08 -07:00
|
|
|
bool mInAnswerFocusChange;
|
2009-12-01 13:05:26 -08:00
|
|
|
#endif // defined(XP_WIN)
|
2010-03-26 13:07:37 -07:00
|
|
|
#if defined(OS_MACOSX)
|
|
|
|
private:
|
2010-04-20 07:52:19 -07:00
|
|
|
Shmem mShSurface;
|
|
|
|
size_t mShWidth;
|
|
|
|
size_t mShHeight;
|
|
|
|
CGColorSpaceRef mShColorSpace;
|
|
|
|
int16_t mDrawingModel;
|
|
|
|
nsIOSurface *mIOSurface;
|
2010-03-26 13:07:37 -07:00
|
|
|
#endif // definied(OS_MACOSX)
|
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;
|
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
|