OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 bool WebPluginContainerImpl::paintCustomOverhangArea(GraphicsContext* context, c
onst IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const
IntRect& dirtyRect) | 664 bool WebPluginContainerImpl::paintCustomOverhangArea(GraphicsContext* context, c
onst IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const
IntRect& dirtyRect) |
665 { | 665 { |
666 context->save(); | 666 context->save(); |
667 context->setFillColor(Color(0xCC, 0xCC, 0xCC)); | 667 context->setFillColor(Color(0xCC, 0xCC, 0xCC)); |
668 context->fillRect(intersection(horizontalOverhangArea, dirtyRect)); | 668 context->fillRect(intersection(horizontalOverhangArea, dirtyRect)); |
669 context->fillRect(intersection(verticalOverhangArea, dirtyRect)); | 669 context->fillRect(intersection(verticalOverhangArea, dirtyRect)); |
670 context->restore(); | 670 context->restore(); |
671 return true; | 671 return true; |
672 } | 672 } |
673 | 673 |
| 674 void handleCopyKeyboardEventsTest(WebPluginContainerImpl* webpluginContainerImpl
, KeyboardEvent* event) |
| 675 { |
| 676 webpluginContainerImpl->handleKeyboardEvent(event); |
| 677 } |
| 678 |
674 // Private methods ------------------------------------------------------------- | 679 // Private methods ------------------------------------------------------------- |
675 | 680 |
676 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPl
ugin* webPlugin) | 681 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPl
ugin* webPlugin) |
677 #if ENABLE(OILPAN) | 682 #if ENABLE(OILPAN) |
678 : m_frame(element->document().frame()) | 683 : m_frame(element->document().frame()) |
679 #else | 684 #else |
680 : FrameDestructionObserver(element->document().frame()) | 685 : FrameDestructionObserver(element->document().frame()) |
681 #endif | 686 #endif |
682 , m_element(element) | 687 , m_element(element) |
683 , m_webPlugin(webPlugin) | 688 , m_webPlugin(webPlugin) |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 WebKeyboardEventBuilder webEvent(*event); | 817 WebKeyboardEventBuilder webEvent(*event); |
813 if (webEvent.type == WebInputEvent::Undefined) | 818 if (webEvent.type == WebInputEvent::Undefined) |
814 return; | 819 return; |
815 | 820 |
816 if (webEvent.type == WebInputEvent::KeyDown) { | 821 if (webEvent.type == WebInputEvent::KeyDown) { |
817 #if OS(MACOSX) | 822 #if OS(MACOSX) |
818 if (webEvent.modifiers == WebInputEvent::MetaKey | 823 if (webEvent.modifiers == WebInputEvent::MetaKey |
819 #else | 824 #else |
820 if (webEvent.modifiers == WebInputEvent::ControlKey | 825 if (webEvent.modifiers == WebInputEvent::ControlKey |
821 #endif | 826 #endif |
822 && webEvent.windowsKeyCode == VKEY_C | 827 && (webEvent.windowsKeyCode == VKEY_C || webEvent.windowsKeyCode ==
VKEY_INSERT) |
823 // Only copy if there's a selection, so that we only ever do this | 828 // Only copy if there's a selection, so that we only ever do this |
824 // for Pepper plugins that support copying. Windowless NPAPI | 829 // for Pepper plugins that support copying. Windowless NPAPI |
825 // plugins will get the event as before. | 830 // plugins will get the event as before. |
826 && m_webPlugin->hasSelection()) { | 831 && m_webPlugin->hasSelection()) { |
827 copy(); | 832 copy(); |
828 event->setDefaultHandled(); | 833 event->setDefaultHandled(); |
829 return; | 834 return; |
830 } | 835 } |
831 } | 836 } |
832 | 837 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 | 967 |
963 return clipRect; | 968 return clipRect; |
964 } | 969 } |
965 | 970 |
966 bool WebPluginContainerImpl::pluginShouldPersist() const | 971 bool WebPluginContainerImpl::pluginShouldPersist() const |
967 { | 972 { |
968 return m_webPlugin->shouldPersist(); | 973 return m_webPlugin->shouldPersist(); |
969 } | 974 } |
970 | 975 |
971 } // namespace blink | 976 } // namespace blink |
OLD | NEW |