| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // crashed plugin there. | 326 // crashed plugin there. |
| 327 return true; | 327 return true; |
| 328 } | 328 } |
| 329 LOG(ERROR) << "Plug-in couldn't be found"; | 329 LOG(ERROR) << "Plug-in couldn't be found"; |
| 330 return false; | 330 return false; |
| 331 } | 331 } |
| 332 | 332 |
| 333 channel_host = | 333 channel_host = |
| 334 PluginChannelHost::GetPluginChannelHost( | 334 PluginChannelHost::GetPluginChannelHost( |
| 335 channel_handle, ChildProcess::current()->io_message_loop_proxy()); | 335 channel_handle, ChildProcess::current()->io_message_loop_proxy()); |
| 336 if (!channel_host.get()) { | 336 if (!channel_host) { |
| 337 LOG(ERROR) << "Couldn't get PluginChannelHost"; | 337 LOG(ERROR) << "Couldn't get PluginChannelHost"; |
| 338 continue; | 338 continue; |
| 339 } | 339 } |
| 340 #if defined(OS_MACOSX) | 340 #if defined(OS_MACOSX) |
| 341 track_nested_removes.reset(); | 341 track_nested_removes.reset(); |
| 342 #endif | 342 #endif |
| 343 | 343 |
| 344 { | 344 { |
| 345 // TODO(bauerb): Debugging for http://crbug.com/141055. | 345 // TODO(bauerb): Debugging for http://crbug.com/141055. |
| 346 ScopedLogLevel log_level(-2); // Equivalent to --v=2 | 346 ScopedLogLevel log_level(-2); // Equivalent to --v=2 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 param.windowless_buffer1 = TransportDIB::DefaultHandleValue(); | 530 param.windowless_buffer1 = TransportDIB::DefaultHandleValue(); |
| 531 param.windowless_buffer_index = back_buffer_index(); | 531 param.windowless_buffer_index = back_buffer_index(); |
| 532 | 532 |
| 533 #if defined(OS_POSIX) | 533 #if defined(OS_POSIX) |
| 534 // If we're using POSIX mmap'd TransportDIBs, sending the handle across | 534 // If we're using POSIX mmap'd TransportDIBs, sending the handle across |
| 535 // IPC establishes a new mapping rather than just sending a window ID, | 535 // IPC establishes a new mapping rather than just sending a window ID, |
| 536 // so only do so if we've actually changed the shared memory bitmaps. | 536 // so only do so if we've actually changed the shared memory bitmaps. |
| 537 if (bitmaps_changed) | 537 if (bitmaps_changed) |
| 538 #endif | 538 #endif |
| 539 { | 539 { |
| 540 if (transport_stores_[0].dib.get()) | 540 if (transport_stores_[0].dib) |
| 541 CopyTransportDIBHandleForMessage(transport_stores_[0].dib->handle(), | 541 CopyTransportDIBHandleForMessage(transport_stores_[0].dib->handle(), |
| 542 ¶m.windowless_buffer0, | 542 ¶m.windowless_buffer0, |
| 543 channel_host_->peer_pid()); | 543 channel_host_->peer_pid()); |
| 544 | 544 |
| 545 if (transport_stores_[1].dib.get()) | 545 if (transport_stores_[1].dib) |
| 546 CopyTransportDIBHandleForMessage(transport_stores_[1].dib->handle(), | 546 CopyTransportDIBHandleForMessage(transport_stores_[1].dib->handle(), |
| 547 ¶m.windowless_buffer1, | 547 ¶m.windowless_buffer1, |
| 548 channel_host_->peer_pid()); | 548 channel_host_->peer_pid()); |
| 549 } | 549 } |
| 550 | 550 |
| 551 IPC::Message* msg; | 551 IPC::Message* msg; |
| 552 #if defined(OS_WIN) | 552 #if defined(OS_WIN) |
| 553 if (UseSynchronousGeometryUpdates()) { | 553 if (UseSynchronousGeometryUpdates()) { |
| 554 msg = new PluginMsg_UpdateGeometrySync(instance_id_, param); | 554 msg = new PluginMsg_UpdateGeometrySync(instance_id_, param); |
| 555 } else // NOLINT | 555 } else // NOLINT |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 | 1201 |
| 1202 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1202 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1203 int resource_id) { | 1203 int resource_id) { |
| 1204 if (!plugin_) | 1204 if (!plugin_) |
| 1205 return; | 1205 return; |
| 1206 | 1206 |
| 1207 plugin_->URLRedirectResponse(allow, resource_id); | 1207 plugin_->URLRedirectResponse(allow, resource_id); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 } // namespace content | 1210 } // namespace content |
| OLD | NEW |