OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/npapi/webplugin_delegate_impl.h" | 5 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #import <QuartzCore/QuartzCore.h> | 8 #import <QuartzCore/QuartzCore.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 if (!text.empty()) { | 638 if (!text.empty()) { |
639 NPCocoaEvent text_event; | 639 NPCocoaEvent text_event; |
640 memset(&text_event, 0, sizeof(NPCocoaEvent)); | 640 memset(&text_event, 0, sizeof(NPCocoaEvent)); |
641 text_event.type = NPCocoaEventTextInput; | 641 text_event.type = NPCocoaEventTextInput; |
642 text_event.data.text.text = | 642 text_event.data.text.text = |
643 reinterpret_cast<NPNSString*>(base::SysUTF16ToNSString(text)); | 643 reinterpret_cast<NPNSString*>(base::SysUTF16ToNSString(text)); |
644 instance()->NPP_HandleEvent(&text_event); | 644 instance()->NPP_HandleEvent(&text_event); |
645 } | 645 } |
646 } | 646 } |
647 | 647 |
648 #ifndef NP_NO_CARBON | |
649 void WebPluginDelegateImpl::SetThemeCursor(ThemeCursor cursor) { | |
650 current_windowless_cursor_.InitFromThemeCursor(cursor); | |
651 } | |
652 | |
653 void WebPluginDelegateImpl::SetCarbonCursor(const Cursor* cursor) { | |
654 current_windowless_cursor_.InitFromCursor(cursor); | |
655 } | |
656 #endif | |
657 | |
658 void WebPluginDelegateImpl::SetNSCursor(NSCursor* cursor) { | 648 void WebPluginDelegateImpl::SetNSCursor(NSCursor* cursor) { |
659 current_windowless_cursor_.InitFromNSCursor(cursor); | 649 current_windowless_cursor_.InitFromNSCursor(cursor); |
660 } | 650 } |
661 | 651 |
662 void WebPluginDelegateImpl::SetNoBufferContext() { | 652 void WebPluginDelegateImpl::SetNoBufferContext() { |
663 use_buffer_context_ = false; | 653 use_buffer_context_ = false; |
664 } | 654 } |
665 | 655 |
666 #pragma mark - | 656 #pragma mark - |
667 #pragma mark Internal Tracking | 657 #pragma mark Internal Tracking |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 DCHECK(!composited_); | 753 DCHECK(!composited_); |
764 windowed_handle_ = handle; | 754 windowed_handle_ = handle; |
765 surface_->SetWindowHandle(handle); | 755 surface_->SetWindowHandle(handle); |
766 UpdateAcceleratedSurface(); | 756 UpdateAcceleratedSurface(); |
767 // Kick off the drawing timer, if necessary. | 757 // Kick off the drawing timer, if necessary. |
768 PluginVisibilityChanged(); | 758 PluginVisibilityChanged(); |
769 } | 759 } |
770 | 760 |
771 } // namespace npapi | 761 } // namespace npapi |
772 } // namespace webkit | 762 } // namespace webkit |
OLD | NEW |