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

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

Issue 404613005: Start using RenderFrameProxyHost objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 } 551 }
552 552
553 void BrowserPlugin::EnableCompositing(bool enable) { 553 void BrowserPlugin::EnableCompositing(bool enable) {
554 bool enabled = !!compositing_helper_; 554 bool enabled = !!compositing_helper_;
555 if (enabled == enable) 555 if (enabled == enable)
556 return; 556 return;
557 557
558 if (enable) { 558 if (enable) {
559 DCHECK(!compositing_helper_.get()); 559 DCHECK(!compositing_helper_.get());
560 if (!compositing_helper_.get()) { 560 if (!compositing_helper_.get()) {
561 compositing_helper_ = 561 compositing_helper_ = ChildFrameCompositingHelper::CreateForBrowserPlugin(
562 ChildFrameCompositingHelper::CreateCompositingHelperForBrowserPlugin( 562 weak_ptr_factory_.GetWeakPtr());
563 weak_ptr_factory_.GetWeakPtr());
564 } 563 }
565 } 564 }
566 compositing_helper_->EnableCompositing(enable); 565 compositing_helper_->EnableCompositing(enable);
567 compositing_helper_->SetContentsOpaque(!GetAllowTransparencyAttribute()); 566 compositing_helper_->SetContentsOpaque(!GetAllowTransparencyAttribute());
568 567
569 if (!enable) { 568 if (!enable) {
570 DCHECK(compositing_helper_.get()); 569 DCHECK(compositing_helper_.get());
571 compositing_helper_->OnContainerDestroy(); 570 compositing_helper_->OnContainerDestroy();
572 compositing_helper_ = NULL; 571 compositing_helper_ = NULL;
573 } 572 }
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 const blink::WebMouseEvent& event) { 963 const blink::WebMouseEvent& event) {
965 browser_plugin_manager()->Send( 964 browser_plugin_manager()->Send(
966 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, 965 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_,
967 guest_instance_id_, 966 guest_instance_id_,
968 plugin_rect_, 967 plugin_rect_,
969 &event)); 968 &event));
970 return true; 969 return true;
971 } 970 }
972 971
973 } // namespace content 972 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698