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

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 2349523002: Add support for edit commands in OOPIFs. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #include "public/platform/WebDragData.h" 85 #include "public/platform/WebDragData.h"
86 #include "public/platform/WebExternalTextureLayer.h" 86 #include "public/platform/WebExternalTextureLayer.h"
87 #include "public/platform/WebRect.h" 87 #include "public/platform/WebRect.h"
88 #include "public/platform/WebString.h" 88 #include "public/platform/WebString.h"
89 #include "public/platform/WebURL.h" 89 #include "public/platform/WebURL.h"
90 #include "public/platform/WebURLError.h" 90 #include "public/platform/WebURLError.h"
91 #include "public/platform/WebURLRequest.h" 91 #include "public/platform/WebURLRequest.h"
92 #include "public/web/WebDOMMessageEvent.h" 92 #include "public/web/WebDOMMessageEvent.h"
93 #include "public/web/WebDocument.h" 93 #include "public/web/WebDocument.h"
94 #include "public/web/WebElement.h" 94 #include "public/web/WebElement.h"
95 #include "public/web/WebFrameClient.h"
95 #include "public/web/WebInputEvent.h" 96 #include "public/web/WebInputEvent.h"
96 #include "public/web/WebPlugin.h" 97 #include "public/web/WebPlugin.h"
97 #include "public/web/WebPrintParams.h" 98 #include "public/web/WebPrintParams.h"
98 #include "public/web/WebPrintPresetOptions.h" 99 #include "public/web/WebPrintPresetOptions.h"
99 #include "public/web/WebViewClient.h" 100 #include "public/web/WebViewClient.h"
100 #include "web/ChromeClientImpl.h" 101 #include "web/ChromeClientImpl.h"
101 #include "web/WebDataSourceImpl.h" 102 #include "web/WebDataSourceImpl.h"
102 #include "web/WebInputEventConversion.h" 103 #include "web/WebInputEventConversion.h"
104 #include "web/WebLocalFrameImpl.h"
103 #include "web/WebViewImpl.h" 105 #include "web/WebViewImpl.h"
104 #include "wtf/Assertions.h" 106 #include "wtf/Assertions.h"
105 107
106 namespace blink { 108 namespace blink {
107 109
108 // Public methods -------------------------------------------------------------- 110 // Public methods --------------------------------------------------------------
109 111
110 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect) 112 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect)
111 { 113 {
112 Widget::setFrameRect(frameRect); 114 Widget::setFrameRect(frameRect);
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 796
795 // Copy stashed info over, and only copy here in order not to interfere 797 // Copy stashed info over, and only copy here in order not to interfere
796 // the ctrl-c logic above. 798 // the ctrl-c logic above.
797 if (currentInputEvent 799 if (currentInputEvent
798 && WebInputEvent::isKeyboardEventType(currentInputEvent->type)) { 800 && WebInputEvent::isKeyboardEventType(currentInputEvent->type)) {
799 webEvent.modifiers |= currentInputEvent->modifiers & 801 webEvent.modifiers |= currentInputEvent->modifiers &
800 (WebInputEvent::CapsLockOn | WebInputEvent::NumLockOn); 802 (WebInputEvent::CapsLockOn | WebInputEvent::NumLockOn);
801 } 803 }
802 804
803 // Give the client a chance to issue edit comamnds. 805 // Give the client a chance to issue edit comamnds.
804 WebViewImpl* view = WebViewImpl::fromPage(m_element->document().frame()->pag e()); 806 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(m_element->docume nt().frame());
805 if (m_webPlugin->supportsEditCommands() && view->client()) 807 if (m_webPlugin->supportsEditCommands())
806 view->client()->handleCurrentKeyboardEvent(); 808 webFrame->client()->handleCurrentKeyboardEvent();
807 809
808 WebCursorInfo cursorInfo; 810 WebCursorInfo cursorInfo;
809 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo) != WebInputEventResu lt::NotHandled) 811 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo) != WebInputEventResu lt::NotHandled)
810 event->setDefaultHandled(); 812 event->setDefaultHandled();
811 } 813 }
812 814
813 void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event) 815 void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event)
814 { 816 {
815 switch (m_touchEventRequestType) { 817 switch (m_touchEventRequestType) {
816 case TouchEventRequestTypeNone: 818 case TouchEventRequestTypeNone:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 // frame view. 939 // frame view.
938 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 940 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
939 } 941 }
940 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 942 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
941 // Convert to the plugin position. 943 // Convert to the plugin position.
942 for (size_t i = 0; i < cutOutRects.size(); i++) 944 for (size_t i = 0; i < cutOutRects.size(); i++)
943 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 945 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
944 } 946 }
945 947
946 } // namespace blink 948 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/EditorClientImpl.cpp ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698