| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 | 659 |
| 660 bool WebPluginContainerImpl::WantsWheelEvents() { | 660 bool WebPluginContainerImpl::WantsWheelEvents() { |
| 661 return wants_wheel_events_; | 661 return wants_wheel_events_; |
| 662 } | 662 } |
| 663 | 663 |
| 664 // Private methods ------------------------------------------------------------- | 664 // Private methods ------------------------------------------------------------- |
| 665 | 665 |
| 666 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, | 666 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, |
| 667 WebPlugin* web_plugin) | 667 WebPlugin* web_plugin) |
| 668 : ContextClient(element->GetDocument().GetFrame()), | 668 : WebPluginContainerBase(element->GetDocument().GetFrame()), |
| 669 element_(element), | 669 element_(element), |
| 670 web_plugin_(web_plugin), | 670 web_plugin_(web_plugin), |
| 671 web_layer_(nullptr), | 671 web_layer_(nullptr), |
| 672 touch_event_request_type_(kTouchEventRequestTypeNone), | 672 touch_event_request_type_(kTouchEventRequestTypeNone), |
| 673 wants_wheel_events_(false), | 673 wants_wheel_events_(false), |
| 674 self_visible_(false), | 674 self_visible_(false), |
| 675 parent_visible_(false), | 675 parent_visible_(false), |
| 676 is_disposed_(false) {} | 676 is_disposed_(false) {} |
| 677 | 677 |
| 678 WebPluginContainerImpl::~WebPluginContainerImpl() { | 678 WebPluginContainerImpl::~WebPluginContainerImpl() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 694 | 694 |
| 695 if (web_layer_) { | 695 if (web_layer_) { |
| 696 GraphicsLayer::UnregisterContentsLayer(web_layer_); | 696 GraphicsLayer::UnregisterContentsLayer(web_layer_); |
| 697 web_layer_ = nullptr; | 697 web_layer_ = nullptr; |
| 698 } | 698 } |
| 699 } | 699 } |
| 700 | 700 |
| 701 DEFINE_TRACE(WebPluginContainerImpl) { | 701 DEFINE_TRACE(WebPluginContainerImpl) { |
| 702 visitor->Trace(parent_); | 702 visitor->Trace(parent_); |
| 703 visitor->Trace(element_); | 703 visitor->Trace(element_); |
| 704 ContextClient::Trace(visitor); | 704 WebPluginContainerBase::Trace(visitor); |
| 705 PluginView::Trace(visitor); | |
| 706 } | 705 } |
| 707 | 706 |
| 708 void WebPluginContainerImpl::HandleMouseEvent(MouseEvent* event) { | 707 void WebPluginContainerImpl::HandleMouseEvent(MouseEvent* event) { |
| 709 // We cache the parent FrameView here as the plugin widget could be deleted | 708 // We cache the parent FrameView here as the plugin widget could be deleted |
| 710 // in the call to HandleEvent. See http://b/issue?id=1362948 | 709 // in the call to HandleEvent. See http://b/issue?id=1362948 |
| 711 FrameView* parent_view = parent_; | 710 FrameView* parent_view = parent_; |
| 712 | 711 |
| 713 // TODO(dtapuska): Move WebMouseEventBuilder into the anonymous namespace | 712 // TODO(dtapuska): Move WebMouseEventBuilder into the anonymous namespace |
| 714 // in this class. | 713 // in this class. |
| 715 WebMouseEventBuilder transformed_event( | 714 WebMouseEventBuilder transformed_event( |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 .GetLayoutViewItem() | 1025 .GetLayoutViewItem() |
| 1027 .IsNull()) { | 1026 .IsNull()) { |
| 1028 // Take our element and get the clip rect from the enclosing layer and | 1027 // Take our element and get the clip rect from the enclosing layer and |
| 1029 // frame view. | 1028 // frame view. |
| 1030 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, | 1029 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, |
| 1031 unobscured_rect); | 1030 unobscured_rect); |
| 1032 } | 1031 } |
| 1033 } | 1032 } |
| 1034 | 1033 |
| 1035 } // namespace blink | 1034 } // namespace blink |
| OLD | NEW |