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

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

Issue 12440005: Use gpu::Mailbox in IPCs instead of std::string (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 break; 480 break;
481 default: 481 default:
482 break; 482 break;
483 } 483 }
484 } 484 }
485 485
486 // static 486 // static
487 void BrowserPluginGuest::AcknowledgeBufferPresent( 487 void BrowserPluginGuest::AcknowledgeBufferPresent(
488 int route_id, 488 int route_id,
489 int gpu_host_id, 489 int gpu_host_id,
490 const std::string& mailbox_name, 490 const gpu::Mailbox& mailbox_name,
491 uint32 sync_point) { 491 uint32 sync_point) {
492 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 492 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
493 ack_params.mailbox_name = mailbox_name; 493 ack_params.mailbox_name = mailbox_name;
494 ack_params.sync_point = sync_point; 494 ack_params.sync_point = sync_point;
495 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 495 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
496 gpu_host_id, 496 gpu_host_id,
497 ack_params); 497 ack_params);
498 } 498 }
499 499
500 // static 500 // static
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 break; 767 break;
768 default: 768 default:
769 NOTREACHED(); 769 NOTREACHED();
770 break; 770 break;
771 } 771 }
772 } 772 }
773 773
774 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id, 774 void BrowserPluginGuest::OnSwapBuffersACK(int instance_id,
775 int route_id, 775 int route_id,
776 int gpu_host_id, 776 int gpu_host_id,
777 const std::string& mailbox_name, 777 const gpu::Mailbox& mailbox_name,
778 uint32 sync_point) { 778 uint32 sync_point) {
779 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point); 779 AcknowledgeBufferPresent(route_id, gpu_host_id, mailbox_name, sync_point);
780 780
781 // This is only relevant on MACOSX and WIN when threaded compositing 781 // This is only relevant on MACOSX and WIN when threaded compositing
782 // is not enabled. In threaded mode, above ACK is sufficient. 782 // is not enabled. In threaded mode, above ACK is sufficient.
783 #if defined(OS_MACOSX) || defined(OS_WIN) 783 #if defined(OS_MACOSX) || defined(OS_WIN)
784 RenderWidgetHostImpl* render_widget_host = 784 RenderWidgetHostImpl* render_widget_host =
785 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost()); 785 RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
786 render_widget_host->AcknowledgeSwapBuffersToRenderer(); 786 render_widget_host->AcknowledgeSwapBuffersToRenderer();
787 #endif // defined(OS_MACOSX) || defined(OS_WIN) 787 #endif // defined(OS_MACOSX) || defined(OS_WIN)
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 // permission this way. 1026 // permission this way.
1027 embedder_web_contents_->RequestMediaAccessPermission(request, callback); 1027 embedder_web_contents_->RequestMediaAccessPermission(request, callback);
1028 } else { 1028 } else {
1029 // Deny the request. 1029 // Deny the request.
1030 callback.Run(content::MediaStreamDevices()); 1030 callback.Run(content::MediaStreamDevices());
1031 } 1031 }
1032 media_requests_map_.erase(media_request_iter); 1032 media_requests_map_.erase(media_request_iter);
1033 } 1033 }
1034 1034
1035 } // namespace content 1035 } // 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