| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "core/events/MouseEvent.h" | 48 #include "core/events/MouseEvent.h" |
| 49 #include "core/events/ProgressEvent.h" | 49 #include "core/events/ProgressEvent.h" |
| 50 #include "core/events/ResourceProgressEvent.h" | 50 #include "core/events/ResourceProgressEvent.h" |
| 51 #include "core/events/TouchEvent.h" | 51 #include "core/events/TouchEvent.h" |
| 52 #include "core/events/WheelEvent.h" | 52 #include "core/events/WheelEvent.h" |
| 53 #include "core/exported/WebDataSourceImpl.h" | 53 #include "core/exported/WebDataSourceImpl.h" |
| 54 #include "core/exported/WebViewBase.h" | 54 #include "core/exported/WebViewBase.h" |
| 55 #include "core/frame/EventHandlerRegistry.h" | 55 #include "core/frame/EventHandlerRegistry.h" |
| 56 #include "core/frame/FrameView.h" | 56 #include "core/frame/FrameView.h" |
| 57 #include "core/frame/LocalFrame.h" | 57 #include "core/frame/LocalFrame.h" |
| 58 #include "core/frame/WebLocalFrameBase.h" |
| 58 #include "core/frame/csp/ContentSecurityPolicy.h" | 59 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 59 #include "core/html/HTMLFormElement.h" | 60 #include "core/html/HTMLFormElement.h" |
| 60 #include "core/html/HTMLPlugInElement.h" | 61 #include "core/html/HTMLPlugInElement.h" |
| 61 #include "core/input/EventHandler.h" | 62 #include "core/input/EventHandler.h" |
| 62 #include "core/layout/HitTestResult.h" | 63 #include "core/layout/HitTestResult.h" |
| 63 #include "core/layout/LayoutBox.h" | 64 #include "core/layout/LayoutBox.h" |
| 64 #include "core/layout/LayoutView.h" | 65 #include "core/layout/LayoutView.h" |
| 65 #include "core/layout/api/LayoutPartItem.h" | 66 #include "core/layout/api/LayoutPartItem.h" |
| 66 #include "core/layout/api/LayoutViewItem.h" | 67 #include "core/layout/api/LayoutViewItem.h" |
| 67 #include "core/loader/FrameLoadRequest.h" | 68 #include "core/loader/FrameLoadRequest.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 98 #include "public/web/WebDOMMessageEvent.h" | 99 #include "public/web/WebDOMMessageEvent.h" |
| 99 #include "public/web/WebDocument.h" | 100 #include "public/web/WebDocument.h" |
| 100 #include "public/web/WebElement.h" | 101 #include "public/web/WebElement.h" |
| 101 #include "public/web/WebFrameClient.h" | 102 #include "public/web/WebFrameClient.h" |
| 102 #include "public/web/WebPlugin.h" | 103 #include "public/web/WebPlugin.h" |
| 103 #include "public/web/WebPrintParams.h" | 104 #include "public/web/WebPrintParams.h" |
| 104 #include "public/web/WebPrintPresetOptions.h" | 105 #include "public/web/WebPrintPresetOptions.h" |
| 105 #include "public/web/WebViewClient.h" | 106 #include "public/web/WebViewClient.h" |
| 106 #include "web/ChromeClientImpl.h" | 107 #include "web/ChromeClientImpl.h" |
| 107 #include "web/WebInputEventConversion.h" | 108 #include "web/WebInputEventConversion.h" |
| 108 #include "web/WebLocalFrameImpl.h" | |
| 109 | 109 |
| 110 namespace blink { | 110 namespace blink { |
| 111 | 111 |
| 112 // Public methods -------------------------------------------------------------- | 112 // Public methods -------------------------------------------------------------- |
| 113 | 113 |
| 114 void WebPluginContainerImpl::SetParent(FrameView* parent) { | 114 void WebPluginContainerImpl::SetParent(FrameView* parent) { |
| 115 DCHECK(!parent || !parent_); | 115 DCHECK(!parent || !parent_); |
| 116 if (!parent || !parent->IsVisible()) | 116 if (!parent || !parent->IsVisible()) |
| 117 SetParentVisible(false); | 117 SetParentVisible(false); |
| 118 parent_ = parent; | 118 parent_ = parent; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 // for Pepper plugins that support copying. Windowless NPAPI | 807 // for Pepper plugins that support copying. Windowless NPAPI |
| 808 // plugins will get the event as before. | 808 // plugins will get the event as before. |
| 809 && web_plugin_->HasSelection()) { | 809 && web_plugin_->HasSelection()) { |
| 810 Copy(); | 810 Copy(); |
| 811 event->SetDefaultHandled(); | 811 event->SetDefaultHandled(); |
| 812 return; | 812 return; |
| 813 } | 813 } |
| 814 } | 814 } |
| 815 | 815 |
| 816 // Give the client a chance to issue edit comamnds. | 816 // Give the client a chance to issue edit comamnds. |
| 817 WebLocalFrameImpl* web_frame = | 817 WebLocalFrameBase* web_frame = |
| 818 WebLocalFrameImpl::FromFrame(element_->GetDocument().GetFrame()); | 818 WebLocalFrameBase::FromFrame(element_->GetDocument().GetFrame()); |
| 819 if (web_plugin_->SupportsEditCommands()) | 819 if (web_plugin_->SupportsEditCommands()) |
| 820 web_frame->Client()->HandleCurrentKeyboardEvent(); | 820 web_frame->Client()->HandleCurrentKeyboardEvent(); |
| 821 | 821 |
| 822 WebCursorInfo cursor_info; | 822 WebCursorInfo cursor_info; |
| 823 if (web_plugin_->HandleInputEvent(web_event, cursor_info) != | 823 if (web_plugin_->HandleInputEvent(web_event, cursor_info) != |
| 824 WebInputEventResult::kNotHandled) | 824 WebInputEventResult::kNotHandled) |
| 825 event->SetDefaultHandled(); | 825 event->SetDefaultHandled(); |
| 826 } | 826 } |
| 827 | 827 |
| 828 void WebPluginContainerImpl::HandleTouchEvent(TouchEvent* event) { | 828 void WebPluginContainerImpl::HandleTouchEvent(TouchEvent* event) { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, | 1009 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, |
| 1010 unobscured_rect); | 1010 unobscured_rect); |
| 1011 } | 1011 } |
| 1012 GetPluginOcclusions(element_, parent_, frame_rect_, cut_out_rects); | 1012 GetPluginOcclusions(element_, parent_, frame_rect_, cut_out_rects); |
| 1013 // Convert to the plugin position. | 1013 // Convert to the plugin position. |
| 1014 for (size_t i = 0; i < cut_out_rects.size(); i++) | 1014 for (size_t i = 0; i < cut_out_rects.size(); i++) |
| 1015 cut_out_rects[i].Move(-frame_rect_.X(), -frame_rect_.Y()); | 1015 cut_out_rects[i].Move(-frame_rect_.X(), -frame_rect_.Y()); |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 } // namespace blink | 1018 } // namespace blink |
| OLD | NEW |