| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/plugin/webplugin_delegate_stub.h" | 5 #include "chrome/plugin/webplugin_delegate_stub.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/common/child_process_logging.h" | 10 #include "chrome/common/child_process_logging.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) { | 363 void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) { |
| 364 #if defined(ENABLE_GPU) | 364 #if defined(ENABLE_GPU) |
| 365 command_buffer_stub_.reset(new CommandBufferStub( | 365 command_buffer_stub_.reset(new CommandBufferStub( |
| 366 static_cast<PluginChannel*>(PluginChannelBase::GetCurrentChannel()), | 366 static_cast<PluginChannel*>(PluginChannelBase::GetCurrentChannel()), |
| 367 delegate_->windowed_handle())); | 367 delegate_->windowed_handle())); |
| 368 | 368 |
| 369 *route_id = command_buffer_stub_->route_id(); | 369 *route_id = command_buffer_stub_->route_id(); |
| 370 #else | 370 #else |
| 371 *route_id = 0; | 371 *route_id = 0; |
| 372 #endif | 372 #endif // ENABLE_GPU |
| 373 } | 373 } |
| 374 | 374 |
| 375 void WebPluginDelegateStub::CreateSharedBuffer( | 375 void WebPluginDelegateStub::CreateSharedBuffer( |
| 376 size_t size, | 376 size_t size, |
| 377 base::SharedMemory* shared_buf, | 377 base::SharedMemory* shared_buf, |
| 378 base::SharedMemoryHandle* remote_handle) { | 378 base::SharedMemoryHandle* remote_handle) { |
| 379 if (!shared_buf->Create(std::wstring(), false, false, size)) { | 379 if (!shared_buf->Create(std::wstring(), false, false, size)) { |
| 380 NOTREACHED(); | 380 NOTREACHED(); |
| 381 return; | 381 return; |
| 382 } | 382 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 405 | 405 |
| 406 void WebPluginDelegateStub::OnHandleURLRequestReply( | 406 void WebPluginDelegateStub::OnHandleURLRequestReply( |
| 407 const PluginMsg_URLRequestReply_Params& params) { | 407 const PluginMsg_URLRequestReply_Params& params) { |
| 408 WebPluginResourceClient* resource_client = | 408 WebPluginResourceClient* resource_client = |
| 409 delegate_->CreateResourceClient(params.resource_id, params.url, | 409 delegate_->CreateResourceClient(params.resource_id, params.url, |
| 410 params.notify_needed, | 410 params.notify_needed, |
| 411 params.notify_data, | 411 params.notify_data, |
| 412 params.stream); | 412 params.stream); |
| 413 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 413 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
| 414 } | 414 } |
| OLD | NEW |