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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 12612005: Revert 186627 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 break; 438 break;
439 default: 439 default:
440 break; 440 break;
441 } 441 }
442 } 442 }
443 443
444 // static 444 // static
445 void BrowserPluginGuest::AcknowledgeBufferPresent( 445 void BrowserPluginGuest::AcknowledgeBufferPresent(
446 int route_id, 446 int route_id,
447 int gpu_host_id, 447 int gpu_host_id,
448 const gpu::Mailbox& mailbox_name, 448 const std::string& mailbox_name,
449 uint32 sync_point) { 449 uint32 sync_point) {
450 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 450 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
451 ack_params.mailbox_name = mailbox_name; 451 ack_params.mailbox_name = mailbox_name;
452 ack_params.sync_point = sync_point; 452 ack_params.sync_point = sync_point;
453 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 453 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
454 gpu_host_id, 454 gpu_host_id,
455 ack_params); 455 ack_params);
456 } 456 }
457 457
458 // static 458 // static
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 break; 707 break;
708 default: 708 default:
709 NOTREACHED(); 709 NOTREACHED();
710 break; 710 break;
711 } 711 }
712 } 712 }
713 713
714 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id, 714 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id,
715 int route_id, 715 int route_id,
716 int gpu_host_id, 716 int gpu_host_id,
717 const gpu::Mailbox& mailbox_name, 717 const std::string& mailbox_name,
718 uint32 sync_point) { 718 uint32 sync_point) {
719 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point); 719 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point);
720 720
721 // This is only relevant on MACOSX and WIN when threaded compositing 721 // This is only relevant on MACOSX and WIN when threaded compositing
722 // is not enabled. In threaded mode, above ACK is sufficient. 722 // is not enabled. In threaded mode, above ACK is sufficient.
723 #if defined(OS_MACOSX) || defined(OS_WIN) 723 #if defined(OS_MACOSX) || defined(OS_WIN)
724 RenderWidgetHostImpl* render_widget_host = 724 RenderWidgetHostImpl* render_widget_host =
725 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost()); 725 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
726 render_widget_host->AcknowledgeSwapBuffersToRenderer(); 726 render_widget_host->AcknowledgeSwapBuffersToRenderer();
727 #endif // defined(OS_MACOSX) || defined(OS_WIN) 727 #endif // defined(OS_MACOSX) || defined(OS_WIN)
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 // permission this way. 934 // permission this way.
935 embedder_web_contents_->RequestMediaAccessPermission(request, callback); 935 embedder_web_contents_->RequestMediaAccessPermission(request, callback);
936 } else { 936 } else {
937 // Deny the request. 937 // Deny the request.
938 callback.Run(content::MediaStreamDevices()); 938 callback.Run(content::MediaStreamDevices());
939 } 939 }
940 media_requests_map_.erase(media_request_iter); 940 media_requests_map_.erase(media_request_iter);
941 } 941 }
942 942
943 } // namespace content 943 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/browser_plugin/browser_plugin_guest_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698