summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 20:32:56 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 20:32:56 +0000
commit9c90deb6ab28f8043574331bb3d2ba6c624f5106 (patch)
tree31b17aa69e5d1d389c489d070d671c9fce886686 /chrome
parent51d772b68710df707c1ab5fff713b8c19e8fe0be (diff)
downloadchromium_src-9c90deb6ab28f8043574331bb3d2ba6c624f5106.zip
chromium_src-9c90deb6ab28f8043574331bb3d2ba6c624f5106.tar.gz
chromium_src-9c90deb6ab28f8043574331bb3d2ba6c624f5106.tar.bz2
Plumb Carbon SetCursor through.
BUG=http://crbug.com/32703 TEST=when hiding cursor (Flash 10.0), cursor hides (but doesn't stay hidden; that gets fixed later) Review URL: http://codereview.chromium.org/552132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/framework.order1
-rw-r--r--chrome/browser/plugin_carbon_interpose_mac.cc10
-rw-r--r--chrome/plugin/plugin_interpose_util_mac.h4
-rw-r--r--chrome/plugin/plugin_interpose_util_mac.mm6
4 files changed, 21 insertions, 0 deletions
diff --git a/chrome/app/framework.order b/chrome/app/framework.order
index 7ef7343..2f66f38 100644
--- a/chrome/app/framework.order
+++ b/chrome/app/framework.order
@@ -28,6 +28,7 @@ __ZN22mac_plugin_interposing33NotifyBrowserOfPluginSelectWindowEj6CGRectb
__ZN22mac_plugin_interposing31NotifyBrowserOfPluginShowWindowEj6CGRectb
__ZN22mac_plugin_interposing31NotifyBrowserOfPluginHideWindowEj6CGRect
__ZN22mac_plugin_interposing28NotifyPluginOfSetThemeCursorEP21WebPluginDelegateImplm
+__ZN22mac_plugin_interposing23NotifyPluginOfSetCursorEP21WebPluginDelegateImplPK6Cursor
__ZN22mac_plugin_interposing23GetPluginWindowHasFocusEPK21WebPluginDelegateImpl
__ZN23FakePluginWindowTrackerC1Ev
__ZN23FakePluginWindowTrackerC2Ev
diff --git a/chrome/browser/plugin_carbon_interpose_mac.cc b/chrome/browser/plugin_carbon_interpose_mac.cc
index def2515..020d9ae 100644
--- a/chrome/browser/plugin_carbon_interpose_mac.cc
+++ b/chrome/browser/plugin_carbon_interpose_mac.cc
@@ -151,6 +151,15 @@ static OSStatus ChromePluginSetThemeCursor(ThemeCursor cursor) {
return SetThemeCursor(cursor);
}
+static void ChromePluginSetCursor(const Cursor* cursor) {
+ WebPluginDelegateImpl* delegate = mac_plugin_interposing::GetActiveDelegate();
+ if (delegate) {
+ mac_plugin_interposing::NotifyPluginOfSetCursor(delegate, cursor);
+ return;
+ }
+ return SetCursor(cursor);
+}
+
#pragma mark -
struct interpose_substitution {
@@ -175,4 +184,5 @@ __attribute__((used)) static const interpose_substitution substitutions[]
INTERPOSE_FUNCTION(DisposeDialog),
INTERPOSE_FUNCTION(FindWindow),
INTERPOSE_FUNCTION(SetThemeCursor),
+ INTERPOSE_FUNCTION(SetCursor),
};
diff --git a/chrome/plugin/plugin_interpose_util_mac.h b/chrome/plugin/plugin_interpose_util_mac.h
index 4942bb6..0806007 100644
--- a/chrome/plugin/plugin_interpose_util_mac.h
+++ b/chrome/plugin/plugin_interpose_util_mac.h
@@ -42,6 +42,10 @@ void NotifyBrowserOfPluginHideWindow(uint32 window_id, CGRect bounds);
void NotifyPluginOfSetThemeCursor(WebPluginDelegateImpl* delegate,
ThemeCursor cursor);
+// Sends a message to the plugin that a cursor was set.
+void NotifyPluginOfSetCursor(WebPluginDelegateImpl* delegate,
+ const Cursor* cursor);
+
// Returns true if the window containing the given plugin delegate is focused.
bool GetPluginWindowHasFocus(const WebPluginDelegateImpl* delegate);
diff --git a/chrome/plugin/plugin_interpose_util_mac.mm b/chrome/plugin/plugin_interpose_util_mac.mm
index 801efbe..7dd20ad 100644
--- a/chrome/plugin/plugin_interpose_util_mac.mm
+++ b/chrome/plugin/plugin_interpose_util_mac.mm
@@ -76,6 +76,12 @@ void NotifyPluginOfSetThemeCursor(WebPluginDelegateImpl* delegate,
}
__attribute__((visibility("default")))
+void NotifyPluginOfSetCursor(WebPluginDelegateImpl* delegate,
+ const Cursor* cursor) {
+ delegate->SetCursor(cursor);
+}
+
+__attribute__((visibility("default")))
bool GetPluginWindowHasFocus(const WebPluginDelegateImpl* delegate) {
return delegate->GetWindowHasFocus();
}