Bug 587370 - Use MOZ_WIDGET_COCOA instead of OS_MACOSX; r=benjamin

This commit is contained in:
Jeremy Huddleston 2011-06-25 11:25:03 -04:00
parent 282a45f969
commit d291ab8e5a
9 changed files with 22 additions and 17 deletions

View File

@ -81,7 +81,7 @@
#include "nsIObserverService.h"
#include <prinrval.h>
#ifdef XP_MACOSX
#ifdef MOZ_WIDGET_COCOA
#include <Carbon/Carbon.h>
#include <ApplicationServices/ApplicationServices.h>
#include <OpenGL/OpenGL.h>

View File

@ -129,7 +129,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
, mWinlessHiddenMsgHWND(0)
#endif // OS_WIN
, mAsyncCallMutex("PluginInstanceChild::mAsyncCallMutex")
#if defined(OS_MACOSX)
#if defined(MOZ_WIDGET_COCOA)
#if defined(__i386__)
, mEventModel(NPEventModelCarbon)
#endif
@ -178,7 +178,7 @@ PluginInstanceChild::~PluginInstanceChild()
#if defined(OS_WIN)
NS_ASSERTION(!mPluginWindowHWND, "Destroying PluginInstanceChild without NPP_Destroy?");
#endif
#if defined(OS_MACOSX)
#if defined(MOZ_WIDGET_COCOA)
if (mShColorSpace) {
::CGColorSpaceRelease(mShColorSpace);
}

View File

@ -45,7 +45,7 @@
#include "mozilla/plugins/PPluginSurfaceChild.h"
#if defined(OS_WIN)
#include "mozilla/gfx/SharedDIBWin.h"
#elif defined(OS_MACOSX)
#elif defined(MOZ_WIDGET_COCOA)
#include "nsCoreAnimationSupport.h"
#include "base/timer.h"
#endif
@ -407,7 +407,7 @@ private:
HBITMAP bmp;
} mAlphaExtract;
#endif // defined(OS_WIN)
#if defined(OS_MACOSX)
#if defined(MOZ_WIDGET_COCOA)
private:
#if defined(__i386__)
NPEventModel mEventModel;

View File

@ -111,7 +111,7 @@ PluginInstanceParent::PluginInstanceParent(PluginModuleParent* parent,
void
PluginInstanceParent::InitQuirksModes(const nsCString& aMimeType)
{
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
NS_NAMED_LITERAL_CSTRING(flash, "application/x-shockwave-flash");
// Flash sends us Invalidate events so we will use those
// instead of the refresh timer.
@ -130,7 +130,7 @@ PluginInstanceParent::~PluginInstanceParent()
NS_ASSERTION(!(mPluginHWND || mPluginWndProc),
"Subclass was not reset correctly before the dtor was reached!");
#endif
#if defined(OS_MACOSX)
#if defined(MOZ_WIDGET_COCOA)
if (mShWidth != 0 && mShHeight != 0) {
DeallocShmem(mShSurface);
}
@ -1783,7 +1783,7 @@ PluginInstanceParent::AnswerPluginFocusChange(const bool& gotFocus)
#endif
}
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
void
PluginInstanceParent::Invalidate()
{

View File

@ -43,7 +43,7 @@
#include "mozilla/plugins/PluginScriptableObjectParent.h"
#if defined(OS_WIN)
#include "mozilla/gfx/SharedDIBWin.h"
#elif defined(OS_MACOSX)
#elif defined(MOZ_WIDGET_COCOA)
#include "nsCoreAnimationSupport.h"
#endif
@ -275,9 +275,9 @@ public:
virtual bool
AnswerPluginFocusChange(const bool& gotFocus);
#if defined(OS_MACOSX)
#ifdef MOZ_WIDGET_COCOA
void Invalidate();
#endif // definied(OS_MACOSX)
#endif // definied(MOZ_WIDGET_COCOA)
nsresult AsyncSetWindow(NPWindow* window);
nsresult GetImage(mozilla::layers::ImageContainer* aContainer, mozilla::layers::Image** aImage);
@ -347,7 +347,7 @@ private:
WNDPROC mPluginWndProc;
bool mNestedEventState;
#endif // defined(XP_WIN)
#if defined(OS_MACOSX)
#if defined(MOZ_WIDGET_COCOA)
private:
Shmem mShSurface;
size_t mShWidth;
@ -355,7 +355,7 @@ private:
CGColorSpaceRef mShColorSpace;
int16_t mDrawingModel;
nsAutoPtr<nsIOSurface> mIOSurface;
#endif // definied(OS_MACOSX)
#endif // definied(MOZ_WIDGET_COCOA)
// ObjectFrame layer wrapper
nsRefPtr<gfxASurface> mFrontSurface;

View File

@ -74,7 +74,7 @@
#include "mozilla/widget/AudioSession.h"
#endif
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
#include "PluginInterposeOSX.h"
#include "PluginUtilsOSX.h"
#endif
@ -1665,7 +1665,7 @@ _popupcontextmenu(NPP instance, NPMenu* menu)
PLUGIN_LOG_DEBUG_FUNCTION;
AssertPluginThread();
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
double pluginX, pluginY;
double screenX, screenY;
@ -2329,7 +2329,7 @@ PluginModuleChild::RecvProcessNativeEventsInRPCCall()
#endif
}
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
void
PluginModuleChild::ProcessNativeEvents() {
CallProcessSomeEvents();

View File

@ -230,7 +230,7 @@ public:
static NPUTF8* NP_CALLBACK NPN_UTF8FromIdentifier(NPIdentifier aIdentifier);
static int32_t NP_CALLBACK NPN_IntFromIdentifier(NPIdentifier aIdentifier);
#ifdef OS_MACOSX
#ifdef MOZ_WIDGET_COCOA
void ProcessNativeEvents();
void PluginShowWindow(uint32_t window_id, bool modal, CGRect r) {

View File

@ -1160,9 +1160,11 @@ CAUpdate(nsITimer *aTimer, void *aClosure) {
nsTObserverArray<PluginInstanceParent*> *ips =
static_cast<nsTObserverArray<PluginInstanceParent*> *>(aClosure);
nsTObserverArray<PluginInstanceParent*>::ForwardIterator iter(*ips);
#ifdef MOZ_WIDGET_COCOA
while (iter.HasMore()) {
iter.GetNext()->Invalidate();
}
#endif // MOZ_WIDGET_COCOA
}
void

View File

@ -164,6 +164,9 @@ EXTRA_DSO_LDOPTS += \
-framework CoreAudio \
-framework AudioToolbox \
-framework AudioUnit \
-framework IOKit \
-framework Foundation \
-framework AppKit \
$(NULL)
endif
endif