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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 return false; | 267 return false; |
268 } | 268 } |
269 | 269 |
270 bool WebPluginDelegateProxy::Initialize(const GURL& url, | 270 bool WebPluginDelegateProxy::Initialize(const GURL& url, |
271 const std::vector<std::string>& arg_names, | 271 const std::vector<std::string>& arg_names, |
272 const std::vector<std::string>& arg_values, | 272 const std::vector<std::string>& arg_values, |
273 webkit_glue::WebPlugin* plugin, | 273 webkit_glue::WebPlugin* plugin, |
274 bool load_manually) { | 274 bool load_manually) { |
275 IPC::ChannelHandle channel_handle; | 275 IPC::ChannelHandle channel_handle; |
276 if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin( | 276 if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin( |
277 url, mime_type_, webkit_glue::GetWebKitLocale(), | 277 url, mime_type_, &channel_handle, &info_))) { |
278 &channel_handle, &info_))) { | |
279 return false; | 278 return false; |
280 } | 279 } |
281 | 280 |
282 if (channel_handle.name.empty()) { | 281 if (channel_handle.name.empty()) { |
283 // We got an invalid handle. Either the plugin couldn't be found (which | 282 // We got an invalid handle. Either the plugin couldn't be found (which |
284 // shouldn't happen, since if we got here the plugin should exist) or the | 283 // shouldn't happen, since if we got here the plugin should exist) or the |
285 // plugin crashed on initialization. | 284 // plugin crashed on initialization. |
286 if (!info_.path.empty()) { | 285 if (!info_.path.empty()) { |
287 render_view_->PluginCrashed(info_.path); | 286 render_view_->PluginCrashed(info_.path); |
288 | 287 |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1533 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
1535 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1534 index->mime_type == "application/x-vnd.moveplay2.qm" || |
1536 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1535 index->mime_type == "application/x-vnd.movenetworks.qm" || |
1537 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1536 index->mime_type == "application/x-vnd.mnplayer.qm") { |
1538 return true; | 1537 return true; |
1539 } | 1538 } |
1540 } | 1539 } |
1541 return false; | 1540 return false; |
1542 } | 1541 } |
1543 #endif | 1542 #endif |
OLD | NEW |