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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 IPC_MESSAGE_HANDLER(PluginMsg_DidFinishManualLoading, | 132 IPC_MESSAGE_HANDLER(PluginMsg_DidFinishManualLoading, |
133 OnDidFinishManualLoading) | 133 OnDidFinishManualLoading) |
134 IPC_MESSAGE_HANDLER(PluginMsg_DidManualLoadFail, OnDidManualLoadFail) | 134 IPC_MESSAGE_HANDLER(PluginMsg_DidManualLoadFail, OnDidManualLoadFail) |
135 IPC_MESSAGE_HANDLER(PluginMsg_InstallMissingPlugin, OnInstallMissingPlugin) | 135 IPC_MESSAGE_HANDLER(PluginMsg_InstallMissingPlugin, OnInstallMissingPlugin) |
136 IPC_MESSAGE_HANDLER(PluginMsg_HandleURLRequestReply, | 136 IPC_MESSAGE_HANDLER(PluginMsg_HandleURLRequestReply, |
137 OnHandleURLRequestReply) | 137 OnHandleURLRequestReply) |
138 IPC_MESSAGE_HANDLER(PluginMsg_HTTPRangeRequestReply, | 138 IPC_MESSAGE_HANDLER(PluginMsg_HTTPRangeRequestReply, |
139 OnHTTPRangeRequestReply) | 139 OnHTTPRangeRequestReply) |
140 IPC_MESSAGE_HANDLER(PluginMsg_CreateCommandBuffer, | 140 IPC_MESSAGE_HANDLER(PluginMsg_CreateCommandBuffer, |
141 OnCreateCommandBuffer) | 141 OnCreateCommandBuffer) |
| 142 #if defined(OS_MACOSX) |
| 143 IPC_MESSAGE_HANDLER(PluginMsg_SetFakeGPUPluginWindowHandle, |
| 144 OnSetFakeGPUPluginWindowHandle) |
| 145 #endif |
142 IPC_MESSAGE_UNHANDLED_ERROR() | 146 IPC_MESSAGE_UNHANDLED_ERROR() |
143 IPC_END_MESSAGE_MAP() | 147 IPC_END_MESSAGE_MAP() |
144 | 148 |
145 if (!in_destructor_) | 149 if (!in_destructor_) |
146 Release(); | 150 Release(); |
147 } | 151 } |
148 | 152 |
149 bool WebPluginDelegateStub::Send(IPC::Message* msg) { | 153 bool WebPluginDelegateStub::Send(IPC::Message* msg) { |
150 return channel_->Send(msg); | 154 return channel_->Send(msg); |
151 } | 155 } |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 delegate_->DidManualLoadFail(); | 372 delegate_->DidManualLoadFail(); |
369 } | 373 } |
370 | 374 |
371 void WebPluginDelegateStub::OnInstallMissingPlugin() { | 375 void WebPluginDelegateStub::OnInstallMissingPlugin() { |
372 delegate_->InstallMissingPlugin(); | 376 delegate_->InstallMissingPlugin(); |
373 } | 377 } |
374 | 378 |
375 void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) { | 379 void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) { |
376 #if defined(ENABLE_GPU) | 380 #if defined(ENABLE_GPU) |
377 command_buffer_stub_.reset(new CommandBufferStub( | 381 command_buffer_stub_.reset(new CommandBufferStub( |
378 static_cast<PluginChannel*>(PluginChannelBase::GetCurrentChannel()), | 382 channel_, |
| 383 instance_id_, |
379 delegate_->windowed_handle())); | 384 delegate_->windowed_handle())); |
380 | 385 |
381 *route_id = command_buffer_stub_->route_id(); | 386 *route_id = command_buffer_stub_->route_id(); |
382 #else | 387 #else |
383 *route_id = 0; | 388 *route_id = 0; |
384 #endif // ENABLE_GPU | 389 #endif // ENABLE_GPU |
385 } | 390 } |
386 | 391 |
387 void WebPluginDelegateStub::CreateSharedBuffer( | 392 void WebPluginDelegateStub::CreateSharedBuffer( |
388 size_t size, | 393 size_t size, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 delegate_->CreateResourceClient(resource_id, url, notify_id); | 426 delegate_->CreateResourceClient(resource_id, url, notify_id); |
422 webplugin_->OnResourceCreated(resource_id, resource_client); | 427 webplugin_->OnResourceCreated(resource_id, resource_client); |
423 } | 428 } |
424 | 429 |
425 void WebPluginDelegateStub::OnHTTPRangeRequestReply( | 430 void WebPluginDelegateStub::OnHTTPRangeRequestReply( |
426 unsigned long resource_id, int range_request_id) { | 431 unsigned long resource_id, int range_request_id) { |
427 WebPluginResourceClient* resource_client = | 432 WebPluginResourceClient* resource_client = |
428 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 433 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
429 webplugin_->OnResourceCreated(resource_id, resource_client); | 434 webplugin_->OnResourceCreated(resource_id, resource_client); |
430 } | 435 } |
| 436 |
| 437 #if defined(OS_MACOSX) |
| 438 void WebPluginDelegateStub::OnSetFakeGPUPluginWindowHandle( |
| 439 gfx::PluginWindowHandle window) { |
| 440 delegate_->set_windowed_handle(window); |
| 441 } |
| 442 #endif |
| 443 |
OLD | NEW |