| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "webkit/glue/webplugin_impl.h" | 6 #include "webkit/glue/webplugin_impl.h" |
| 7 | 7 |
| 8 #include "Cursor.h" | 8 #include "Cursor.h" |
| 9 #include "Document.h" | 9 #include "Document.h" |
| 10 #include "DocumentLoader.h" | 10 #include "DocumentLoader.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (isParentVisible() == visible) | 205 if (isParentVisible() == visible) |
| 206 return; // No change. | 206 return; // No change. |
| 207 | 207 |
| 208 WebCore::Widget::setParentVisible(visible); | 208 WebCore::Widget::setParentVisible(visible); |
| 209 if (!isSelfVisible()) | 209 if (!isSelfVisible()) |
| 210 return; // This widget has explicitely been marked as not visible. | 210 return; // This widget has explicitely been marked as not visible. |
| 211 | 211 |
| 212 impl_->UpdateVisibility(); | 212 impl_->UpdateVisibility(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 // We override this function so that if the plugin is windowed, we can call |
| 216 // NPP_SetWindow at the first possible moment. This ensures that NPP_SetWindow |
| 217 // is called before the manual load data is sent to a plugin. If this order is |
| 218 // reversed, Flash won't load videos. |
| 219 void WebPluginContainer::setParent(WebCore::ScrollView* view) { |
| 220 WebCore::Widget::setParent(view); |
| 221 if (view) { |
| 222 impl_->setFrameRect(frameRect()); |
| 223 } |
| 224 } |
| 225 |
| 215 void WebPluginContainer::windowCutoutRects(const WebCore::IntRect& bounds, | 226 void WebPluginContainer::windowCutoutRects(const WebCore::IntRect& bounds, |
| 216 WTF::Vector<WebCore::IntRect>* | 227 WTF::Vector<WebCore::IntRect>* |
| 217 cutouts) const { | 228 cutouts) const { |
| 218 impl_->windowCutoutRects(bounds, cutouts); | 229 impl_->windowCutoutRects(bounds, cutouts); |
| 219 } | 230 } |
| 220 | 231 |
| 221 void WebPluginContainer::didReceiveResponse( | 232 void WebPluginContainer::didReceiveResponse( |
| 222 const WebCore::ResourceResponse& response) { | 233 const WebCore::ResourceResponse& response) { |
| 223 set_ignore_response_error(false); | 234 set_ignore_response_error(false); |
| 224 | 235 |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 | 1354 |
| 1344 WebPluginGeometry move; | 1355 WebPluginGeometry move; |
| 1345 move.window = window_; | 1356 move.window = window_; |
| 1346 move.window_rect = gfx::Rect(); | 1357 move.window_rect = gfx::Rect(); |
| 1347 move.clip_rect = gfx::Rect(); | 1358 move.clip_rect = gfx::Rect(); |
| 1348 move.rects_valid = false; | 1359 move.rects_valid = false; |
| 1349 move.visible = widget_->isVisible(); | 1360 move.visible = widget_->isVisible(); |
| 1350 | 1361 |
| 1351 webview->delegate()->DidMove(webview, move); | 1362 webview->delegate()->DidMove(webview, move); |
| 1352 } | 1363 } |
| OLD | NEW |