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

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

Issue 2927823002: Drop ImageLoader in plugins (Closed)
Patch Set: Drop ImageLoader in plugins Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index e74ced8e1c9621b12119ea393847c285e2891abe..7f739b2b9a70bedca497044b594b57994c2205e3 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -35,7 +35,6 @@
#include "core/frame/Settings.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/HTMLContentElement.h"
-#include "core/html/HTMLImageLoader.h"
#include "core/html/PluginDocument.h"
#include "core/input/EventHandler.h"
#include "core/inspector/ConsoleMessage.h"
@@ -91,15 +90,10 @@ HTMLPlugInElement::~HTMLPlugInElement() {
}
DEFINE_TRACE(HTMLPlugInElement) {
- visitor->Trace(image_loader_);
visitor->Trace(persisted_plugin_);
HTMLFrameOwnerElement::Trace(visitor);
}
-bool HTMLPlugInElement::HasPendingActivity() const {
- return image_loader_ && image_loader_->HasPendingActivity();
-}
-
void HTMLPlugInElement::SetPersistedPlugin(PluginView* plugin) {
if (persisted_plugin_ == plugin)
return;
@@ -172,12 +166,6 @@ void HTMLPlugInElement::RemoveAllEventListeners() {
plugin->EventListenersRemoved();
}
-void HTMLPlugInElement::DidMoveToNewDocument(Document& old_document) {
- if (image_loader_)
- image_loader_->ElementDidMoveToNewDocument();
- HTMLFrameOwnerElement::DidMoveToNewDocument(old_document);
-}
-
void HTMLPlugInElement::AttachLayoutTree(const AttachContext& context) {
HTMLFrameOwnerElement::AttachLayoutTree(context);
@@ -191,14 +179,10 @@ void HTMLPlugInElement::AttachLayoutTree(const AttachContext& context) {
return;
}
- if (IsImageType()) {
- if (!image_loader_)
- image_loader_ = HTMLImageLoader::Create(this);
- image_loader_->UpdateFromElement();
- } else if (NeedsPluginUpdate() && !GetLayoutEmbeddedItem().IsNull() &&
- !GetLayoutEmbeddedItem().ShowsUnavailablePluginIndicator() &&
- GetObjectContentType() != ObjectContentType::kPlugin &&
- !is_delaying_load_event_) {
+ if (NeedsPluginUpdate() && !GetLayoutEmbeddedItem().IsNull() &&
+ !GetLayoutEmbeddedItem().ShowsUnavailablePluginIndicator() &&
+ GetObjectContentType() != ObjectContentType::kPlugin &&
+ !is_delaying_load_event_) {
is_delaying_load_event_ = true;
GetDocument().IncrementLoadEventDelayCount();
GetDocument().LoadPluginsSoon();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698