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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 if ((handle_out->fd = HANDLE_EINTR(dup(handle_in.fd))) < 0) { | 498 if ((handle_out->fd = HANDLE_EINTR(dup(handle_in.fd))) < 0) { |
499 PLOG(ERROR) << "dup()"; | 499 PLOG(ERROR) << "dup()"; |
500 return; | 500 return; |
501 } | 501 } |
502 handle_out->auto_close = true; | 502 handle_out->auto_close = true; |
503 #elif defined(OS_WIN) | 503 #elif defined(OS_WIN) |
504 // On Windows we need to duplicate the handle for the plugin process. | 504 // On Windows we need to duplicate the handle for the plugin process. |
505 *handle_out = NULL; | 505 *handle_out = NULL; |
506 sandbox::BrokerDuplicateHandle(handle_in, peer_pid, handle_out, | 506 sandbox::BrokerDuplicateHandle(handle_in, peer_pid, handle_out, |
507 FILE_MAP_READ | FILE_MAP_WRITE, 0); | 507 FILE_MAP_READ | FILE_MAP_WRITE, 0); |
508 CHECK(*handle_out != NULL); | 508 DCHECK(*handle_out != NULL); |
509 #else | 509 #else |
510 // Don't need to do anything special for other platforms. | 510 // Don't need to do anything special for other platforms. |
511 *handle_out = handle_in; | 511 *handle_out = handle_in; |
512 #endif | 512 #endif |
513 } | 513 } |
514 | 514 |
515 void WebPluginDelegateProxy::SendUpdateGeometry( | 515 void WebPluginDelegateProxy::SendUpdateGeometry( |
516 bool bitmaps_changed) { | 516 bool bitmaps_changed) { |
517 PluginMsg_UpdateGeometry_Param param; | 517 PluginMsg_UpdateGeometry_Param param; |
518 param.window_rect = plugin_rect_; | 518 param.window_rect = plugin_rect_; |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 } | 1473 } |
1474 #endif | 1474 #endif |
1475 | 1475 |
1476 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1476 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1477 int resource_id) { | 1477 int resource_id) { |
1478 if (!plugin_) | 1478 if (!plugin_) |
1479 return; | 1479 return; |
1480 | 1480 |
1481 plugin_->URLRedirectResponse(allow, resource_id); | 1481 plugin_->URLRedirectResponse(allow, resource_id); |
1482 } | 1482 } |
OLD | NEW |