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

Unified Diff: Source/web/WebPluginContainerImpl.cpp

Issue 1284403003: Persist plugins over reattach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 4 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 | « Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPluginContainerImpl.cpp
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp
index 6196f7769f4d8f07eb1aaa7f0712a0751f822b2f..8ec7ca5205cc8375c766985d4722f1946bcfa66f 100644
--- a/Source/web/WebPluginContainerImpl.cpp
+++ b/Source/web/WebPluginContainerImpl.cpp
@@ -244,7 +244,8 @@ void WebPluginContainerImpl::setParentVisible(bool parentVisible)
if (!isSelfVisible())
return; // This widget has explicitely been marked as not visible.
- m_webPlugin->updateVisibility(isVisible());
+ if (m_webPlugin)
+ m_webPlugin->updateVisibility(isVisible());
}
void WebPluginContainerImpl::setParent(Widget* widget)
@@ -710,11 +711,14 @@ void WebPluginContainerImpl::dispose()
for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i)
m_pluginLoadObservers[i]->clearPluginContainer();
- m_webPlugin->destroy();
+ if (m_webPlugin)
+ m_webPlugin->destroy();
m_webPlugin = nullptr;
- if (m_webLayer)
+ if (m_webLayer) {
GraphicsLayer::unregisterContentsLayer(m_webLayer);
+ m_webLayer = nullptr;
+ }
m_pluginLoadObservers.clear();
m_element = nullptr;
@@ -953,9 +957,4 @@ void WebPluginContainerImpl::calculateGeometry(IntRect& windowRect, IntRect& cli
cutOutRects[i].move(-frameRect().x(), -frameRect().y());
}
-bool WebPluginContainerImpl::pluginShouldPersist() const
-{
- return m_webPlugin->shouldPersist();
-}
-
} // namespace blink
« no previous file with comments | « Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698