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

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

Issue 3176027: Mac: Well-behaved accelerated plugins, actual fix (Closed)
Patch Set: test Created 10 years, 4 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
OLDNEW
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/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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 BindFakePluginWindowHandle(opaque); 1393 BindFakePluginWindowHandle(opaque);
1394 } 1394 }
1395 1395
1396 // Synthesize a fake window handle for the plug-in to identify the instance 1396 // Synthesize a fake window handle for the plug-in to identify the instance
1397 // to the browser, allowing mapping to a surface for hardware acceleration 1397 // to the browser, allowing mapping to a surface for hardware acceleration
1398 // of plug-in content. The browser generates the handle which is then set on 1398 // of plug-in content. The browser generates the handle which is then set on
1399 // the plug-in. Returns true if it successfully sets the window handle on the 1399 // the plug-in. Returns true if it successfully sets the window handle on the
1400 // plug-in. 1400 // plug-in.
1401 bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) { 1401 bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) {
1402 gfx::PluginWindowHandle fake_window = NULL; 1402 gfx::PluginWindowHandle fake_window = NULL;
1403 if (render_view_) 1403 if (render_view_) {
1404 fake_window = render_view_->AllocateFakePluginWindowHandle(opaque, false); 1404 fake_window = render_view_->AllocateFakePluginWindowHandle(
1405 opaque, transparent_, /*is_root=*/false);
1406 }
1405 // If we aren't running on 10.6, this allocation will fail. 1407 // If we aren't running on 10.6, this allocation will fail.
1406 if (!fake_window) 1408 if (!fake_window)
1407 return false; 1409 return false;
1408 OnSetWindow(fake_window); 1410 OnSetWindow(fake_window);
1409 if (!Send(new PluginMsg_SetFakeAcceleratedSurfaceWindowHandle(instance_id_, 1411 if (!Send(new PluginMsg_SetFakeAcceleratedSurfaceWindowHandle(instance_id_,
1410 fake_window))) { 1412 fake_window))) {
1411 return false; 1413 return false;
1412 } 1414 }
1413 1415
1414 // Since this isn't a real window, it doesn't get initial size and location 1416 // Since this isn't a real window, it doesn't get initial size and location
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 if (index->mime_type == "application/x-vnd.moveplayer.qm" || 1561 if (index->mime_type == "application/x-vnd.moveplayer.qm" ||
1560 index->mime_type == "application/x-vnd.moveplay2.qm" || 1562 index->mime_type == "application/x-vnd.moveplay2.qm" ||
1561 index->mime_type == "application/x-vnd.movenetworks.qm" || 1563 index->mime_type == "application/x-vnd.movenetworks.qm" ||
1562 index->mime_type == "application/x-vnd.mnplayer.qm") { 1564 index->mime_type == "application/x-vnd.mnplayer.qm") {
1563 return true; 1565 return true;
1564 } 1566 }
1565 } 1567 }
1566 return false; 1568 return false;
1567 } 1569 }
1568 #endif 1570 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698