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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 if (!info_.path.empty()) { | 285 if (!info_.path.empty()) { |
286 render_view_->PluginCrashed(info_.path); | 286 render_view_->PluginCrashed(info_.path); |
287 | 287 |
288 // Return true so that the plugin widget is created and we can paint the | 288 // Return true so that the plugin widget is created and we can paint the |
289 // crashed plugin there. | 289 // crashed plugin there. |
290 return true; | 290 return true; |
291 } | 291 } |
292 return false; | 292 return false; |
293 } | 293 } |
294 | 294 |
295 #if defined(OS_POSIX) | |
296 // If we received a ChannelHandle, register it now. | |
297 if (channel_handle.socket.fd >= 0) | |
298 IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd); | |
299 #endif | |
300 | |
301 scoped_refptr<PluginChannelHost> channel_host( | 295 scoped_refptr<PluginChannelHost> channel_host( |
302 PluginChannelHost::GetPluginChannelHost( | 296 PluginChannelHost::GetPluginChannelHost( |
303 channel_handle.name, ChildProcess::current()->io_message_loop())); | 297 channel_handle, ChildProcess::current()->io_message_loop())); |
304 if (!channel_host.get()) | 298 if (!channel_host.get()) |
305 return false; | 299 return false; |
306 | 300 |
307 int instance_id; | 301 int instance_id; |
308 bool result = channel_host->Send(new PluginMsg_CreateInstance( | 302 bool result = channel_host->Send(new PluginMsg_CreateInstance( |
309 mime_type_, &instance_id)); | 303 mime_type_, &instance_id)); |
310 if (!result) | 304 if (!result) |
311 return false; | 305 return false; |
312 | 306 |
313 channel_host_ = channel_host; | 307 channel_host_ = channel_host; |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 #endif | 1558 #endif |
1565 | 1559 |
1566 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1560 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1567 int resource_id) { | 1561 int resource_id) { |
1568 if (!plugin_) | 1562 if (!plugin_) |
1569 return; | 1563 return; |
1570 | 1564 |
1571 plugin_->URLRedirectResponse(allow, resource_id); | 1565 plugin_->URLRedirectResponse(allow, resource_id); |
1572 } | 1566 } |
1573 | 1567 |
OLD | NEW |