From 997a47ac989abd294e94f8384f1eba6ad5698ad2 Mon Sep 17 00:00:00 2001 From: "avi@chromium.org" Date: Fri, 15 Jan 2010 21:51:19 +0000 Subject: (Mac) Intercept (Carbon) cursor setting by plugins and forward it on properly. BUG=http://crbug.com/20717 TEST=as in bug; this covers old Flash Review URL: http://codereview.chromium.org/550062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36416 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/plugin_carbon_interpose_mac.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'chrome/browser/plugin_carbon_interpose_mac.cc') diff --git a/chrome/browser/plugin_carbon_interpose_mac.cc b/chrome/browser/plugin_carbon_interpose_mac.cc index 852bf73..45f0ffe 100644 --- a/chrome/browser/plugin_carbon_interpose_mac.cc +++ b/chrome/browser/plugin_carbon_interpose_mac.cc @@ -144,6 +144,17 @@ static WindowPartCode ChromePluginFindWindow(Point point, WindowRef* window) { return FindWindow(point, window); } +static OSStatus ChromePluginSetThemeCursor(ThemeCursor cursor) { + FakePluginWindowTracker* tracker = FakePluginWindowTracker::SharedInstance(); + WebPluginDelegateImpl* delegate = + tracker->GetDelegateForFakeWindow(tracker->get_active_plugin_window()); + if (delegate) { + mac_plugin_interposing::NotifyPluginOfSetThemeCursor(delegate, cursor); + return noErr; + } + return SetThemeCursor(cursor); +} + #pragma mark - struct interpose_substitution { @@ -167,4 +178,5 @@ __attribute__((used)) static const interpose_substitution substitutions[] INTERPOSE_FUNCTION(ReleaseWindow), INTERPOSE_FUNCTION(DisposeDialog), INTERPOSE_FUNCTION(FindWindow), + INTERPOSE_FUNCTION(SetThemeCursor), }; -- cgit v1.1