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

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

Issue 357043006: Prepare RenderFrameProxy for mirroring the frame tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Created 6 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
« no previous file with comments | « no previous file | content/renderer/child_frame_compositing_helper.h » ('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 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/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 540 }
541 541
542 void BrowserPlugin::EnableCompositing(bool enable) { 542 void BrowserPlugin::EnableCompositing(bool enable) {
543 bool enabled = !!compositing_helper_; 543 bool enabled = !!compositing_helper_;
544 if (enabled == enable) 544 if (enabled == enable)
545 return; 545 return;
546 546
547 if (enable) { 547 if (enable) {
548 DCHECK(!compositing_helper_.get()); 548 DCHECK(!compositing_helper_.get());
549 if (!compositing_helper_.get()) { 549 if (!compositing_helper_.get()) {
550 compositing_helper_ = 550 compositing_helper_ = ChildFrameCompositingHelper::CreateForBrowserPlugin(
551 ChildFrameCompositingHelper::CreateCompositingHelperForBrowserPlugin( 551 weak_ptr_factory_.GetWeakPtr());
552 weak_ptr_factory_.GetWeakPtr());
553 } 552 }
554 } 553 }
555 compositing_helper_->EnableCompositing(enable); 554 compositing_helper_->EnableCompositing(enable);
556 compositing_helper_->SetContentsOpaque(!GetAllowTransparencyAttribute()); 555 compositing_helper_->SetContentsOpaque(!GetAllowTransparencyAttribute());
557 556
558 if (!enable) { 557 if (!enable) {
559 DCHECK(compositing_helper_.get()); 558 DCHECK(compositing_helper_.get());
560 compositing_helper_->OnContainerDestroy(); 559 compositing_helper_->OnContainerDestroy();
561 compositing_helper_ = NULL; 560 compositing_helper_ = NULL;
562 } 561 }
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 const blink::WebMouseEvent& event) { 952 const blink::WebMouseEvent& event) {
954 browser_plugin_manager()->Send( 953 browser_plugin_manager()->Send(
955 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, 954 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_,
956 guest_instance_id_, 955 guest_instance_id_,
957 plugin_rect_, 956 plugin_rect_,
958 &event)); 957 &event));
959 return true; 958 return true;
960 } 959 }
961 960
962 } // namespace content 961 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/child_frame_compositing_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698