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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 return false; | 288 return false; |
289 } | 289 } |
290 | 290 |
291 #if defined(OS_POSIX) | 291 #if defined(OS_POSIX) |
292 // If we received a ChannelHandle, register it now. | 292 // If we received a ChannelHandle, register it now. |
293 if (channel_handle.socket.fd >= 0) | 293 if (channel_handle.socket.fd >= 0) |
294 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); | 294 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); |
295 #endif | 295 #endif |
296 | 296 |
297 scoped_refptr<PluginChannelHost> channel_host = | 297 scoped_refptr<PluginChannelHost> channel_host( |
298 PluginChannelHost::GetPluginChannelHost( | 298 PluginChannelHost::GetPluginChannelHost( |
299 channel_handle.name, ChildProcess::current()->io_message_loop()); | 299 channel_handle.name, ChildProcess::current()->io_message_loop())); |
300 if (!channel_host.get()) | 300 if (!channel_host.get()) |
301 return false; | 301 return false; |
302 | 302 |
303 int instance_id; | 303 int instance_id; |
304 bool result = channel_host->Send(new PluginMsg_CreateInstance( | 304 bool result = channel_host->Send(new PluginMsg_CreateInstance( |
305 mime_type_, &instance_id)); | 305 mime_type_, &instance_id)); |
306 if (!result) | 306 if (!result) |
307 return false; | 307 return false; |
308 | 308 |
309 channel_host_ = channel_host; | 309 channel_host_ = channel_host; |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |