Chromium Code Reviews| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 return; // No change. | 257 return; // No change. |
| 258 | 258 |
| 259 Widget::setParentVisible(parentVisible); | 259 Widget::setParentVisible(parentVisible); |
| 260 if (!isSelfVisible()) | 260 if (!isSelfVisible()) |
| 261 return; // This widget has explicitely been marked as not visible. | 261 return; // This widget has explicitely been marked as not visible. |
| 262 | 262 |
| 263 if (m_webPlugin) | 263 if (m_webPlugin) |
| 264 m_webPlugin->updateVisibility(isVisible()); | 264 m_webPlugin->updateVisibility(isVisible()); |
| 265 } | 265 } |
| 266 | 266 |
| 267 void WebPluginContainerImpl::setParent(Widget* widget) | |
| 268 { | |
| 269 // We override this function so that if the plugin is windowed, we can call | |
| 270 // NPP_SetWindow at the first possible moment. This ensures that | |
| 271 // NPP_SetWindow is called before the manual load data is sent to a plugin. | |
| 272 // If this order is reversed, Flash won't load videos. | |
|
dcheng
2016/06/24 22:57:26
As far as I can tell, it works now? I tried vimeo,
esprehn
2016/06/24 23:01:42
Pepper flash doesn't supported the windowed mode I
piman
2016/06/25 01:07:01
Right, Pepper is essentially a mix of windowed and
| |
| 273 | |
| 274 Widget::setParent(widget); | |
| 275 if (widget) | |
| 276 reportGeometry(); | |
| 277 else if (m_webPlugin) | |
| 278 m_webPlugin->containerDidDetachFromParent(); | |
| 279 } | |
| 280 | |
| 281 void WebPluginContainerImpl::setPlugin(WebPlugin* plugin) | 267 void WebPluginContainerImpl::setPlugin(WebPlugin* plugin) |
| 282 { | 268 { |
| 283 if (plugin == m_webPlugin) | 269 if (plugin == m_webPlugin) |
| 284 return; | 270 return; |
| 285 | 271 |
| 286 m_element->resetInstance(); | 272 m_element->resetInstance(); |
| 287 m_webPlugin = plugin; | 273 m_webPlugin = plugin; |
| 288 m_isDisposed = false; | 274 m_isDisposed = false; |
| 289 } | 275 } |
| 290 | 276 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 955 // frame view. | 941 // frame view. |
| 956 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); | 942 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); |
| 957 } | 943 } |
| 958 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 944 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 959 // Convert to the plugin position. | 945 // Convert to the plugin position. |
| 960 for (size_t i = 0; i < cutOutRects.size(); i++) | 946 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 961 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 947 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 962 } | 948 } |
| 963 | 949 |
| 964 } // namespace blink | 950 } // namespace blink |
| OLD | NEW |