| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "app/surface/transport_dib.h" | 10 #include "app/surface/transport_dib.h" |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 // chrome/renderer/webplugin_delegate_proxy.cc, method | 557 // chrome/renderer/webplugin_delegate_proxy.cc, method |
| 558 // WebPluginDelegateProxy::CreateBitmap() for similar code). The TransportDIB | 558 // WebPluginDelegateProxy::CreateBitmap() for similar code). The TransportDIB |
| 559 // is cached in the browser, and is freed (in typical cases) by the | 559 // is cached in the browser, and is freed (in typical cases) by the |
| 560 // PlatformImage2DImpl's destructor. | 560 // PlatformImage2DImpl's destructor. |
| 561 TransportDIB::Handle dib_handle; | 561 TransportDIB::Handle dib_handle; |
| 562 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(buffer_size, | 562 IPC::Message* msg = new ViewHostMsg_AllocTransportDIB(buffer_size, |
| 563 true, | 563 true, |
| 564 &dib_handle); | 564 &dib_handle); |
| 565 if (!RenderThread::current()->Send(msg)) | 565 if (!RenderThread::current()->Send(msg)) |
| 566 return NULL; | 566 return NULL; |
| 567 if (!TransportDIB::is_valid(dib_handle)) | 567 if (!TransportDIB::is_valid_handle(dib_handle)) |
| 568 return NULL; | 568 return NULL; |
| 569 | 569 |
| 570 TransportDIB* dib = TransportDIB::Map(dib_handle); | 570 TransportDIB* dib = TransportDIB::Map(dib_handle); |
| 571 #else | 571 #else |
| 572 static int next_dib_id = 0; | 572 static int next_dib_id = 0; |
| 573 TransportDIB* dib = TransportDIB::Create(buffer_size, next_dib_id++); | 573 TransportDIB* dib = TransportDIB::Create(buffer_size, next_dib_id++); |
| 574 if (!dib) | 574 if (!dib) |
| 575 return NULL; | 575 return NULL; |
| 576 #endif | 576 #endif |
| 577 | 577 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 } | 958 } |
| 959 | 959 |
| 960 void PepperPluginDelegateImpl::HasUnsupportedFeature() { | 960 void PepperPluginDelegateImpl::HasUnsupportedFeature() { |
| 961 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( | 961 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( |
| 962 render_view_->routing_id())); | 962 render_view_->routing_id())); |
| 963 } | 963 } |
| 964 | 964 |
| 965 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { | 965 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { |
| 966 return render_view_->p2p_socket_dispatcher(); | 966 return render_view_->p2p_socket_dispatcher(); |
| 967 } | 967 } |
| OLD | NEW |