Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 6614030: Revert 76840 - Removed GPU plugin.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome/test/ui/pepper_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 // dispatched (for a plugin on an otherwise static page). 1443 // dispatched (for a plugin on an otherwise static page).
1444 render_view_->didInvalidateRect(WebKit::WebRect(plugin_rect_.x(), 1444 render_view_->didInvalidateRect(WebKit::WebRect(plugin_rect_.x(),
1445 plugin_rect_.y(), 1445 plugin_rect_.y(),
1446 plugin_rect_.width(), 1446 plugin_rect_.width(),
1447 plugin_rect_.height())); 1447 plugin_rect_.height()));
1448 1448
1449 return true; 1449 return true;
1450 } 1450 }
1451 #endif 1451 #endif
1452 1452
1453 CommandBufferProxy* WebPluginDelegateProxy::CreateCommandBuffer() {
1454 #if defined(ENABLE_GPU)
1455 #if defined(OS_MACOSX)
1456 if (!BindFakePluginWindowHandle(true))
1457 return NULL;
1458 #endif
1459 int command_buffer_id;
1460 if (!Send(new PluginMsg_CreateCommandBuffer(instance_id_,
1461 &command_buffer_id))) {
1462 return NULL;
1463 }
1464
1465 CommandBufferProxy* command_buffer =
1466 new CommandBufferProxy(channel_host_, command_buffer_id);
1467 channel_host_->AddRoute(command_buffer_id, command_buffer, NULL);
1468 return command_buffer;
1469 #else
1470 return NULL;
1471 #endif // ENABLE_GPU
1472 }
1473
1474 void WebPluginDelegateProxy::DestroyCommandBuffer(
1475 CommandBufferProxy* command_buffer) {
1476 DCHECK(command_buffer);
1477 #if defined(ENABLE_GPU)
1478 Send(new PluginMsg_DestroyCommandBuffer(instance_id_));
1479 channel_host_->RemoveRoute(command_buffer->route_id());
1480 delete command_buffer;
1481 #endif
1482 }
1483
1453 gfx::PluginWindowHandle WebPluginDelegateProxy::GetPluginWindowHandle() { 1484 gfx::PluginWindowHandle WebPluginDelegateProxy::GetPluginWindowHandle() {
1454 return window_; 1485 return window_;
1455 } 1486 }
1456 1487
1457 void WebPluginDelegateProxy::OnCancelDocumentLoad() { 1488 void WebPluginDelegateProxy::OnCancelDocumentLoad() {
1458 plugin_->CancelDocumentLoad(); 1489 plugin_->CancelDocumentLoad();
1459 } 1490 }
1460 1491
1461 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( 1492 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest(
1462 const std::string& url, 1493 const std::string& url,
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 } 1585 }
1555 #endif 1586 #endif
1556 1587
1557 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, 1588 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
1558 int resource_id) { 1589 int resource_id) {
1559 if (!plugin_) 1590 if (!plugin_)
1560 return; 1591 return;
1561 1592
1562 plugin_->URLRedirectResponse(allow, resource_id); 1593 plugin_->URLRedirectResponse(allow, resource_id);
1563 } 1594 }
OLDNEW
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | chrome/test/ui/pepper_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698