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

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 2888283004: Revert of Introduce WebPluginContainerBase to abstract WebPluginContainerImpl. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 658 }
659 659
660 bool WebPluginContainerImpl::WantsWheelEvents() { 660 bool WebPluginContainerImpl::WantsWheelEvents() {
661 return wants_wheel_events_; 661 return wants_wheel_events_;
662 } 662 }
663 663
664 // Private methods ------------------------------------------------------------- 664 // Private methods -------------------------------------------------------------
665 665
666 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, 666 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element,
667 WebPlugin* web_plugin) 667 WebPlugin* web_plugin)
668 : WebPluginContainerBase(element->GetDocument().GetFrame()), 668 : ContextClient(element->GetDocument().GetFrame()),
669 element_(element), 669 element_(element),
670 web_plugin_(web_plugin), 670 web_plugin_(web_plugin),
671 web_layer_(nullptr), 671 web_layer_(nullptr),
672 touch_event_request_type_(kTouchEventRequestTypeNone), 672 touch_event_request_type_(kTouchEventRequestTypeNone),
673 wants_wheel_events_(false), 673 wants_wheel_events_(false),
674 self_visible_(false), 674 self_visible_(false),
675 parent_visible_(false), 675 parent_visible_(false),
676 is_disposed_(false) {} 676 is_disposed_(false) {}
677 677
678 WebPluginContainerImpl::~WebPluginContainerImpl() { 678 WebPluginContainerImpl::~WebPluginContainerImpl() {
(...skipping 15 matching lines...) Expand all
694 694
695 if (web_layer_) { 695 if (web_layer_) {
696 GraphicsLayer::UnregisterContentsLayer(web_layer_); 696 GraphicsLayer::UnregisterContentsLayer(web_layer_);
697 web_layer_ = nullptr; 697 web_layer_ = nullptr;
698 } 698 }
699 } 699 }
700 700
701 DEFINE_TRACE(WebPluginContainerImpl) { 701 DEFINE_TRACE(WebPluginContainerImpl) {
702 visitor->Trace(parent_); 702 visitor->Trace(parent_);
703 visitor->Trace(element_); 703 visitor->Trace(element_);
704 WebPluginContainerBase::Trace(visitor); 704 ContextClient::Trace(visitor);
705 PluginView::Trace(visitor);
705 } 706 }
706 707
707 void WebPluginContainerImpl::HandleMouseEvent(MouseEvent* event) { 708 void WebPluginContainerImpl::HandleMouseEvent(MouseEvent* event) {
708 // We cache the parent FrameView here as the plugin widget could be deleted 709 // We cache the parent FrameView here as the plugin widget could be deleted
709 // in the call to HandleEvent. See http://b/issue?id=1362948 710 // in the call to HandleEvent. See http://b/issue?id=1362948
710 FrameView* parent_view = parent_; 711 FrameView* parent_view = parent_;
711 712
712 // TODO(dtapuska): Move WebMouseEventBuilder into the anonymous namespace 713 // TODO(dtapuska): Move WebMouseEventBuilder into the anonymous namespace
713 // in this class. 714 // in this class.
714 WebMouseEventBuilder transformed_event( 715 WebMouseEventBuilder transformed_event(
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 .GetLayoutViewItem() 1026 .GetLayoutViewItem()
1026 .IsNull()) { 1027 .IsNull()) {
1027 // Take our element and get the clip rect from the enclosing layer and 1028 // Take our element and get the clip rect from the enclosing layer and
1028 // frame view. 1029 // frame view.
1029 ComputeClipRectsForPlugin(element_, window_rect, clip_rect, 1030 ComputeClipRectsForPlugin(element_, window_rect, clip_rect,
1030 unobscured_rect); 1031 unobscured_rect);
1031 } 1032 }
1032 } 1033 }
1033 1034
1034 } // namespace blink 1035 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | third_party/WebKit/Source/web/WebPluginDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698