Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4003)

Unified Diff: chrome/plugin/plugin_interpose_util_mac.mm

Issue 554003: (Mac) Intercept (Cocoa) cursor setting by plugins and forward it on properly.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/plugin_interpose_util_mac.mm
===================================================================
--- chrome/plugin/plugin_interpose_util_mac.mm (revision 36533)
+++ chrome/plugin/plugin_interpose_util_mac.mm (working copy)
@@ -75,7 +75,6 @@
delegate->SetThemeCursor(cursor);
}
-
} // namespace mac_plugin_interposing
#pragma mark -
@@ -169,6 +168,23 @@
@end
+@interface NSCursor (ChromePluginInterposing)
+- (void)chromePlugin_set;
+@end
+
+@implementation NSCursor (ChromePluginInterposing)
+
+- (void)chromePlugin_set {
+ WebPluginDelegateImpl* delegate = mac_plugin_interposing::GetActiveDelegate();
+ if (delegate) {
+ delegate->SetNSCursor(self);
+ return;
+ }
+ [self chromePlugin_set];
+}
+
+@end
+
#pragma mark -
static void ExchangeMethods(Class target_class, SEL original, SEL replacement) {
@@ -195,6 +211,9 @@
ExchangeMethods([NSApplication class], @selector(runModalForWindow:),
@selector(chromePlugin_runModalForWindow:));
+
+ ExchangeMethods([NSCursor class], @selector(set),
+ @selector(chromePlugin_set));
}
} // namespace mac_plugin_interposing
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698