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

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

Issue 2814643003: Remove FrameViewBase as base class of PluginView. (Closed)
Patch Set: fix unused var 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..f1a04447e14cbc2449b46984f7bfa7884628affd 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -35,6 +35,7 @@
#include "core/page/Page.h"
#include "core/plugins/PluginView.h"
#include "platform/weborigin/SecurityOrigin.h"
+#include "wtf/Vector.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 DisposeList = Vector<FrameOrPlugin*>;
+static DisposeList& PendingDispose() {
dcheng 2017/04/12 00:06:39 PendingDispose / DisposeList is a bit too generic
joelhockey 2017/04/12 04:33:00 If you suggest a name, I'm happy to change it. Bu
+ DEFINE_STATIC_LOCAL(DisposeList, list, ());
+ 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();
+ DisposeList list;
+ PendingDispose().Swap(list);
+ for (const auto& frame_or_plugin : list) {
+ frame_or_plugin->Dispose();
}
}
}
@@ -215,12 +217,12 @@ bool HTMLFrameOwnerElement::IsKeyboardFocusable() const {
return content_frame_ && HTMLElement::IsKeyboardFocusable();
}
-void HTMLFrameOwnerElement::DisposeWidgetSoon(FrameViewBase* frame_view_base) {
+void HTMLFrameOwnerElement::DisposeSoon(FrameOrPlugin* frame_or_plugin) {
if (g_update_suspend_count) {
- WidgetsPendingDispose().insert(frame_view_base);
+ PendingDispose().push_back(frame_or_plugin);
return;
}
- frame_view_base->Dispose();
+ frame_or_plugin->Dispose();
}
void HTMLFrameOwnerElement::FrameOwnerPropertiesChanged() {

Powered by Google App Engine
This is Rietveld 408576698