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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 19331002: Associate an id with the output surface to handle lost contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android, tests Created 7 years, 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 void BrowserPlugin::OnCompositorFrameSwapped(const IPC::Message& message) { 478 void BrowserPlugin::OnCompositorFrameSwapped(const IPC::Message& message) {
479 BrowserPluginMsg_CompositorFrameSwapped::Param param; 479 BrowserPluginMsg_CompositorFrameSwapped::Param param;
480 if (!BrowserPluginMsg_CompositorFrameSwapped::Read(&message, &param)) 480 if (!BrowserPluginMsg_CompositorFrameSwapped::Read(&message, &param))
481 return; 481 return;
482 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 482 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
483 param.b.AssignTo(frame.get()); 483 param.b.AssignTo(frame.get());
484 484
485 EnableCompositing(true); 485 EnableCompositing(true);
486 compositing_helper_->OnCompositorFrameSwapped(frame.Pass(), 486 compositing_helper_->OnCompositorFrameSwapped(frame.Pass(),
487 param.c /* route_id */, 487 param.c /* route_id */,
488 param.d /* host_id */); 488 param.d /* output_surface_id */,
489 param.e /* host_id */);
489 } 490 }
490 491
491 void BrowserPlugin::OnGuestContentWindowReady(int guest_instance_id, 492 void BrowserPlugin::OnGuestContentWindowReady(int guest_instance_id,
492 int content_window_routing_id) { 493 int content_window_routing_id) {
493 DCHECK(content_window_routing_id != MSG_ROUTING_NONE); 494 DCHECK(content_window_routing_id != MSG_ROUTING_NONE);
494 content_window_routing_id_ = content_window_routing_id; 495 content_window_routing_id_ = content_window_routing_id;
495 } 496 }
496 497
497 void BrowserPlugin::OnGuestGone(int guest_instance_id, 498 void BrowserPlugin::OnGuestGone(int guest_instance_id,
498 int process_id, 499 int process_id,
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 const WebKit::WebMouseEvent& event) { 1490 const WebKit::WebMouseEvent& event) {
1490 browser_plugin_manager()->Send( 1491 browser_plugin_manager()->Send(
1491 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, 1492 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_,
1492 guest_instance_id_, 1493 guest_instance_id_,
1493 plugin_rect_, 1494 plugin_rect_,
1494 &event)); 1495 &event));
1495 return true; 1496 return true;
1496 } 1497 }
1497 1498
1498 } // namespace content 1499 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698