| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #elif defined(USE_X11) | 9 #elif defined(USE_X11) |
| 10 #include <cairo/cairo.h> | 10 #include <cairo/cairo.h> |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 #if defined(OS_WIN) | 1179 #if defined(OS_WIN) |
| 1180 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { | 1180 bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { |
| 1181 // Need to update geometry synchronously with WMP, otherwise if a site | 1181 // Need to update geometry synchronously with WMP, otherwise if a site |
| 1182 // scripts the plugin to start playing while it's in the middle of handling | 1182 // scripts the plugin to start playing while it's in the middle of handling |
| 1183 // an update geometry message, videos don't play. See urls in bug 20260. | 1183 // an update geometry message, videos don't play. See urls in bug 20260. |
| 1184 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) | 1184 if (info_.name.find(ASCIIToUTF16("Windows Media Player")) != string16::npos) |
| 1185 return true; | 1185 return true; |
| 1186 | 1186 |
| 1187 // The move networks plugin needs to be informed of geometry updates | 1187 // The move networks plugin needs to be informed of geometry updates |
| 1188 // synchronously. | 1188 // synchronously. |
| 1189 std::vector<webkit::WebPluginMimeType>::iterator index; | 1189 std::vector<WebPluginMimeType>::iterator index; |
| 1190 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); | 1190 for (index = info_.mime_types.begin(); index != info_.mime_types.end(); |
| 1191 index++) { | 1191 index++) { |
| 1192 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1192 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
| 1193 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1193 index->mime_type == "application/x-vnd.moveplay2.qm" || |
| 1194 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1194 index->mime_type == "application/x-vnd.movenetworks.qm" || |
| 1195 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1195 index->mime_type == "application/x-vnd.mnplayer.qm") { |
| 1196 return true; | 1196 return true; |
| 1197 } | 1197 } |
| 1198 } | 1198 } |
| 1199 return false; | 1199 return false; |
| 1200 } | 1200 } |
| 1201 #endif | 1201 #endif |
| 1202 | 1202 |
| 1203 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1203 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1204 int resource_id) { | 1204 int resource_id) { |
| 1205 if (!plugin_) | 1205 if (!plugin_) |
| 1206 return; | 1206 return; |
| 1207 | 1207 |
| 1208 plugin_->URLRedirectResponse(allow, resource_id); | 1208 plugin_->URLRedirectResponse(allow, resource_id); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 } // namespace content | 1211 } // namespace content |
| OLD | NEW |