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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2814643003: Remove FrameViewBase as base class of PluginView. (Closed)
Patch Set: Address final comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
index 90d7742c2a7a0d82a13e9e5e742135dd53aa0b32..f7cde742771a0871e27ce196a4705d9de7e37dfa 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -34,6 +34,7 @@
#include "core/loader/FrameLoader.h"
#include "core/page/Page.h"
#include "core/plugins/PluginView.h"
+#include "platform/heap/HeapAllocator.h"
#include "platform/weborigin/SecurityOrigin.h"
namespace blink {
@@ -54,9 +55,10 @@ static FrameViewBaseSet& WidgetsPendingTemporaryRemovalFromParent() {
return set;
}
-static FrameViewBaseSet& WidgetsPendingDispose() {
- DEFINE_STATIC_LOCAL(FrameViewBaseSet, set, (new FrameViewBaseSet));
- return set;
+using FrameOrPluginList = HeapVector<Member<FrameOrPlugin>>;
+static FrameOrPluginList& FrameOrPluginsPendingDispose() {
+ DEFINE_STATIC_LOCAL(FrameOrPluginList, list, (new FrameOrPluginList));
+ return list;
}
SubframeLoadingDisabler::SubtreeRootSet&
@@ -100,10 +102,10 @@ void HTMLFrameOwnerElement::UpdateSuspendScope::
}
{
- FrameViewBaseSet set;
- WidgetsPendingDispose().Swap(set);
- for (const auto& frame_view_base : set) {
- frame_view_base->Dispose();
+ FrameOrPluginList list;
+ FrameOrPluginsPendingDispose().Swap(list);
+ for (const auto& frame_or_plugin : list) {
+ frame_or_plugin->Dispose();
}
}
}
@@ -115,7 +117,7 @@ HTMLFrameOwnerElement::UpdateSuspendScope::~UpdateSuspendScope() {
--g_update_suspend_count;
}
-// Unlike moveWidgetToParentSoon, this will not call dispose the Widget.
+// Unlike moveWidgetToParentSoon, this will not call dispose.
void TemporarilyRemoveWidgetFromParentSoon(FrameViewBase* frame_view_base) {
if (g_update_suspend_count) {
WidgetsPendingTemporaryRemovalFromParent().insert(frame_view_base);
@@ -215,12 +217,13 @@ bool HTMLFrameOwnerElement::IsKeyboardFocusable() const {
return content_frame_ && HTMLElement::IsKeyboardFocusable();
}
-void HTMLFrameOwnerElement::DisposeWidgetSoon(FrameViewBase* frame_view_base) {
+void HTMLFrameOwnerElement::DisposeFrameOrPluginSoon(
+ FrameOrPlugin* frame_or_plugin) {
if (g_update_suspend_count) {
- WidgetsPendingDispose().insert(frame_view_base);
+ FrameOrPluginsPendingDispose().push_back(frame_or_plugin);
return;
}
- frame_view_base->Dispose();
+ frame_or_plugin->Dispose();
}
void HTMLFrameOwnerElement::FrameOwnerPropertiesChanged() {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698