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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 | 663 |
664 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, | 664 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, |
665 WebPlugin* webPlugin) | 665 WebPlugin* webPlugin) |
666 : DOMWindowProperty(element->document().frame()), | 666 : DOMWindowProperty(element->document().frame()), |
667 m_element(element), | 667 m_element(element), |
668 m_webPlugin(webPlugin), | 668 m_webPlugin(webPlugin), |
669 m_webLayer(nullptr), | 669 m_webLayer(nullptr), |
670 m_touchEventRequestType(TouchEventRequestTypeNone), | 670 m_touchEventRequestType(TouchEventRequestTypeNone), |
671 m_wantsWheelEvents(false), | 671 m_wantsWheelEvents(false), |
672 m_isDisposed(false) { | 672 m_isDisposed(false) { |
673 ThreadState::current()->registerPreFinalizer(this); | |
674 } | 673 } |
675 | 674 |
676 WebPluginContainerImpl::~WebPluginContainerImpl() { | 675 WebPluginContainerImpl::~WebPluginContainerImpl() { |
677 // The plugin container must have been disposed of by now. | 676 // The plugin container must have been disposed of by now. |
678 DCHECK(!m_webPlugin); | 677 DCHECK(!m_webPlugin); |
679 } | 678 } |
680 | 679 |
681 void WebPluginContainerImpl::dispose() { | 680 void WebPluginContainerImpl::dispose() { |
682 m_isDisposed = true; | 681 m_isDisposed = true; |
683 | 682 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 // frame view. | 960 // frame view. |
962 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 961 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
963 } | 962 } |
964 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 963 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
965 // Convert to the plugin position. | 964 // Convert to the plugin position. |
966 for (size_t i = 0; i < cutOutRects.size(); i++) | 965 for (size_t i = 0; i < cutOutRects.size(); i++) |
967 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 966 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
968 } | 967 } |
969 | 968 |
970 } // namespace blink | 969 } // namespace blink |
OLD | NEW |