| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/renderer/webplugin_delegate_proxy.h" | 5 #include "content/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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 #if defined(OS_WIN) | 1369 #if defined(OS_WIN) |
| 1370 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { | 1370 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { |
| 1371 // Need to update geometry synchronously with WMP, otherwise if a site | 1371 // Need to update geometry synchronously with WMP, otherwise if a site |
| 1372 // scripts the plugin to start playing while it's in the middle of handling | 1372 // scripts the plugin to start playing while it's in the middle of handling |
| 1373 // an update geometry message, videos don't play. See urls in bug 20260. | 1373 // an update geometry message, videos don't play. See urls in bug 20260. |
| 1374 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) | 1374 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) |
| 1375 return true; | 1375 return true; |
| 1376 | 1376 |
| 1377 // The move networks plugin needs to be informed of geometry updates | 1377 // The move networks plugin needs to be informed of geometry updates |
| 1378 // synchronously. | 1378 // synchronously. |
| 1379 std::vector<webkit::npapi::WebPluginMimeType>::iterator index; | 1379 std::vector<webkit::WebPluginMimeType>::iterator index; |
| 1380 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); | 1380 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); |
| 1381 index++) { | 1381 index++) { |
| 1382 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1382 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
| 1383 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1383 index->mime_type == "application/x-vnd.moveplay2.qm" || |
| 1384 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1384 index->mime_type == "application/x-vnd.movenetworks.qm" || |
| 1385 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1385 index->mime_type == "application/x-vnd.mnplayer.qm") { |
| 1386 return true; | 1386 return true; |
| 1387 } | 1387 } |
| 1388 } | 1388 } |
| 1389 return false; | 1389 return false; |
| 1390 } | 1390 } |
| 1391 #endif | 1391 #endif |
| 1392 | 1392 |
| 1393 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1393 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1394 int resource_id) { | 1394 int resource_id) { |
| 1395 if (!plugin_) | 1395 if (!plugin_) |
| 1396 return; | 1396 return; |
| 1397 | 1397 |
| 1398 plugin_->URLRedirectResponse(allow, resource_id); | 1398 plugin_->URLRedirectResponse(allow, resource_id); |
| 1399 } | 1399 } |
| OLD | NEW |