OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/renderer/webplugin_delegate_proxy.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 *dib_handle = TransportDIB::DefaultHandleValue(); | 1520 *dib_handle = TransportDIB::DefaultHandleValue(); |
1521 } | 1521 } |
1522 | 1522 |
1523 void WebPluginDelegateProxy::OnAcceleratedSurfaceFreeTransportDIB( | 1523 void WebPluginDelegateProxy::OnAcceleratedSurfaceFreeTransportDIB( |
1524 TransportDIB::Id dib_id) { | 1524 TransportDIB::Id dib_id) { |
1525 if (render_view_) | 1525 if (render_view_) |
1526 render_view_->AcceleratedSurfaceFreeTransportDIB(dib_id); | 1526 render_view_->AcceleratedSurfaceFreeTransportDIB(dib_id); |
1527 } | 1527 } |
1528 | 1528 |
1529 void WebPluginDelegateProxy::OnAcceleratedSurfaceBuffersSwapped( | 1529 void WebPluginDelegateProxy::OnAcceleratedSurfaceBuffersSwapped( |
1530 gfx::PluginWindowHandle window) { | 1530 gfx::PluginWindowHandle window, uint64 surface_id) { |
1531 if (render_view_) | 1531 if (render_view_) |
1532 render_view_->AcceleratedSurfaceBuffersSwapped(window); | 1532 render_view_->AcceleratedSurfaceBuffersSwapped(window, surface_id); |
1533 } | 1533 } |
1534 #endif | 1534 #endif |
1535 | 1535 |
1536 #if defined(OS_WIN) | 1536 #if defined(OS_WIN) |
1537 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { | 1537 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { |
1538 // Need to update geometry synchronously with WMP, otherwise if a site | 1538 // Need to update geometry synchronously with WMP, otherwise if a site |
1539 // scripts the plugin to start playing while it's in the middle of handling | 1539 // scripts the plugin to start playing while it's in the middle of handling |
1540 // an update geometry message, videos don't play. See urls in bug 20260. | 1540 // an update geometry message, videos don't play. See urls in bug 20260. |
1541 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) | 1541 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) |
1542 return true; | 1542 return true; |
1543 | 1543 |
1544 // The move networks plugin needs to be informed of geometry updates | 1544 // The move networks plugin needs to be informed of geometry updates |
1545 // synchronously. | 1545 // synchronously. |
1546 std::vector<WebPluginMimeType>::iterator index; | 1546 std::vector<WebPluginMimeType>::iterator index; |
1547 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); | 1547 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); |
1548 index++) { | 1548 index++) { |
1549 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1549 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
1550 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1550 index->mime_type == "application/x-vnd.moveplay2.qm" || |
1551 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1551 index->mime_type == "application/x-vnd.movenetworks.qm" || |
1552 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1552 index->mime_type == "application/x-vnd.mnplayer.qm") { |
1553 return true; | 1553 return true; |
1554 } | 1554 } |
1555 } | 1555 } |
1556 return false; | 1556 return false; |
1557 } | 1557 } |
1558 #endif | 1558 #endif |
OLD | NEW |