| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/plugin/plugin_interpose_util_mac.h" | 5 #include "content/plugin/plugin_interpose_util_mac.h" |
| 6 | 6 |
| 7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
| 8 #import <objc/runtime.h> | 8 #import <objc/runtime.h> |
| 9 | 9 |
| 10 #include "chrome/plugin/plugin_thread.h" | |
| 11 #include "content/common/plugin_messages.h" | 10 #include "content/common/plugin_messages.h" |
| 11 #include "content/plugin/plugin_thread.h" |
| 12 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 12 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 13 | 13 |
| 14 namespace mac_plugin_interposing { | 14 namespace mac_plugin_interposing { |
| 15 | 15 |
| 16 // TODO(stuartmorgan): Make this an IPC to order the plugin process above the | 16 // TODO(stuartmorgan): Make this an IPC to order the plugin process above the |
| 17 // browser process only if the browser is current frontmost. | 17 // browser process only if the browser is current frontmost. |
| 18 __attribute__((visibility("default"))) | 18 __attribute__((visibility("default"))) |
| 19 void SwitchToPluginProcess() { | 19 void SwitchToPluginProcess() { |
| 20 ProcessSerialNumber this_process, front_process; | 20 ProcessSerialNumber this_process, front_process; |
| 21 if ((GetCurrentProcess(&this_process) != noErr) || | 21 if ((GetCurrentProcess(&this_process) != noErr) || |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 Class nscursor_class = [NSCursor class]; | 297 Class nscursor_class = [NSCursor class]; |
| 298 ExchangeMethods(nscursor_class, NO, @selector(set), | 298 ExchangeMethods(nscursor_class, NO, @selector(set), |
| 299 @selector(chromePlugin_set)); | 299 @selector(chromePlugin_set)); |
| 300 ExchangeMethods(nscursor_class, YES, @selector(hide), | 300 ExchangeMethods(nscursor_class, YES, @selector(hide), |
| 301 @selector(chromePlugin_hide)); | 301 @selector(chromePlugin_hide)); |
| 302 ExchangeMethods(nscursor_class, YES, @selector(unhide), | 302 ExchangeMethods(nscursor_class, YES, @selector(unhide), |
| 303 @selector(chromePlugin_unhide)); | 303 @selector(chromePlugin_unhide)); |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace mac_plugin_interposing | 306 } // namespace mac_plugin_interposing |
| OLD | NEW |