| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "webkit/glue/plugins/webplugin_delegate_impl.h" | 7 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 if (focus_notifier_) | 433 if (focus_notifier_) |
| 434 focus_notifier_(this); | 434 focus_notifier_(this); |
| 435 else | 435 else |
| 436 FocusNotify(this); | 436 FocusNotify(this); |
| 437 } | 437 } |
| 438 | 438 |
| 439 void WebPluginDelegateImpl::SetThemeCursor(ThemeCursor cursor) { | 439 void WebPluginDelegateImpl::SetThemeCursor(ThemeCursor cursor) { |
| 440 current_windowless_cursor_.InitFromThemeCursor(cursor); | 440 current_windowless_cursor_.InitFromThemeCursor(cursor); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void WebPluginDelegateImpl::SetNSCursor(NSCursor* cursor) { |
| 444 current_windowless_cursor_.InitFromNSCursor(cursor); |
| 445 } |
| 446 |
| 443 void WebPluginDelegateImpl::UpdatePluginLocation(const WebMouseEvent& event) { | 447 void WebPluginDelegateImpl::UpdatePluginLocation(const WebMouseEvent& event) { |
| 444 instance()->set_plugin_origin(gfx::Point(event.globalX - event.x, | 448 instance()->set_plugin_origin(gfx::Point(event.globalX - event.x, |
| 445 event.globalY - event.y)); | 449 event.globalY - event.y)); |
| 446 | 450 |
| 447 #ifndef NP_NO_CARBON | 451 #ifndef NP_NO_CARBON |
| 448 if (instance()->event_model() == NPEventModelCarbon) { | 452 if (instance()->event_model() == NPEventModelCarbon) { |
| 449 last_window_x_offset_ = event.globalX - event.windowX; | 453 last_window_x_offset_ = event.globalX - event.windowX; |
| 450 last_window_y_offset_ = event.globalY - event.windowY; | 454 last_window_y_offset_ = event.globalY - event.windowY; |
| 451 last_mouse_x_ = event.globalX; | 455 last_mouse_x_ = event.globalX; |
| 452 last_mouse_y_ = event.globalY; | 456 last_mouse_y_ = event.globalY; |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 | 877 |
| 874 #ifndef NP_NO_CARBON | 878 #ifndef NP_NO_CARBON |
| 875 if (instance()->event_model() == NPEventModelCarbon) { | 879 if (instance()->event_model() == NPEventModelCarbon) { |
| 876 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 880 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 877 null_event_factory_.NewRunnableMethod( | 881 null_event_factory_.NewRunnableMethod( |
| 878 &WebPluginDelegateImpl::OnNullEvent), | 882 &WebPluginDelegateImpl::OnNullEvent), |
| 879 kPluginIdleThrottleDelayMs); | 883 kPluginIdleThrottleDelayMs); |
| 880 } | 884 } |
| 881 #endif | 885 #endif |
| 882 } | 886 } |
| OLD | NEW |