summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/plugin/plugin_carbon_interpose_mac.cc13
-rw-r--r--content/plugin/plugin_interpose_util_mac.h2
-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
5 files changed, 41 insertions, 2 deletions
diff --git a/content/plugin/plugin_carbon_interpose_mac.cc b/content/plugin/plugin_carbon_interpose_mac.cc
index 20a7d54..6b71916 100644
--- a/content/plugin/plugin_carbon_interpose_mac.cc
+++ b/content/plugin/plugin_carbon_interpose_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -12,6 +12,17 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#if defined(MAC_OS_X_VERSION_10_7) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+// 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" {
+Boolean PtInRect(Point pt, const Rect* r);
+void SetCursor(const Cursor* crsr);
+}
+#endif // 10.7+ SDK
+
// Returns true if the given window is modal.
static bool IsModalWindow(WindowRef window) {
WindowModality modality = kWindowModalityNone;
diff --git a/content/plugin/plugin_interpose_util_mac.h b/content/plugin/plugin_interpose_util_mac.h
index b98ed5c..3f9912c 100644
--- a/content/plugin/plugin_interpose_util_mac.h
+++ b/content/plugin/plugin_interpose_util_mac.h
@@ -9,6 +9,8 @@
#import "base/basictypes.h"
+typedef struct Cursor Cursor;
+
// This is really a WebPluginDelegateImpl, but that class is private to the
// framework, and these functions are called from a dylib.
typedef void* OpaquePluginRef;
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