summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:18:45 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:18:45 +0000
commitb9e86a733401dce38488331973ec0ec918e502a5 (patch)
treeacf169300323b15f0781e1655fbed83f3dfbd3fe /webkit
parentbc99d22866cff7a21e81451d22b352ec6ffe9e82 (diff)
downloadchromium_src-b9e86a733401dce38488331973ec0ec918e502a5.zip
chromium_src-b9e86a733401dce38488331973ec0ec918e502a5.tar.gz
chromium_src-b9e86a733401dce38488331973ec0ec918e502a5.tar.bz2
mac: Let Carbon plugin stuff buid with the 10.7 SDK
QuickDraw.h is gone, but the frameworks still exports the symbols on 10.8. So just declare the functions for now, so that we can build with the 10.7 SDK. We can remove Carbon plugin support later. BUG=136844 TEST=none TBR=stuartmorgan,tony Review URL: https://chromiumcodereview.appspot.com/10826036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148647 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webcursor.h2
-rw-r--r--webkit/glue/webcursor_mac.mm13
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm13
3 files changed, 27 insertions, 1 deletions
diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h
index 0c7eb6a..f7611e5 100644
--- a/webkit/glue/webcursor.h
+++ b/webkit/glue/webcursor.h
@@ -26,7 +26,7 @@ typedef struct _GdkCursor GdkCursor;
class NSCursor;
#endif
typedef UInt32 ThemeCursor;
-struct Cursor;
+typedef struct Cursor Cursor;
#endif
class Pickle;
diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm
index b69b8f7..afbd5ce 100644
--- a/webkit/glue/webcursor_mac.mm
+++ b/webkit/glue/webcursor_mac.mm
@@ -18,6 +18,19 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "ui/base/resource/resource_bundle.h"
+
+#if defined(MAC_OS_X_VERSION_10_7) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+// The 10.7 SDK no longer has QuickDraw headers.
+// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
+typedef short Bits16[16];
+struct Cursor {
+ Bits16 data;
+ Bits16 mask;
+ Point hotSpot;
+};
+#endif // 10.7+ SDK
+
using WebKit::WebCursorInfo;
using WebKit::WebImage;
using WebKit::WebSize;
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index 644b089..dd7c9c7f 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -43,6 +43,19 @@ using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
+#if defined(MAC_OS_X_VERSION_10_7) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+#ifndef NP_NO_CARBON
+// QuickdrawAPI.h is no longer included in the 10.7 SDK, but the symbols are
+// still exported by QD.framework (a subframework of ApplicationServices).
+// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
+extern "C" {
+void SetRect(Rect* r, short left, short top, short right, short bottom);
+void OffsetRect(Rect* r, short dh, short dv);
+}
+#endif // NP_NO_CARBON
+#endif // 10.7+ SDK
+
// Important implementation notes: The Mac definition of NPAPI, particularly
// the distinction between windowed and windowless modes, differs from the
// Windows and Linux definitions. Most of those differences are