diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
commit | 6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch) | |
tree | d9c68d1cca0b3e352f1e438561f3e504e641a08f /Source/WebCore/page/Page.cpp | |
parent | d0424a769059c84ae20beb3c217812792ea6726b (diff) | |
download | qtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz |
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Source/WebCore/page/Page.cpp')
-rw-r--r-- | Source/WebCore/page/Page.cpp | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp index a5f365e35..cf4d0fec9 100644 --- a/Source/WebCore/page/Page.cpp +++ b/Source/WebCore/page/Page.cpp @@ -55,7 +55,6 @@ #include "PageGroup.h" #include "PluginData.h" #include "PluginView.h" -#include "PluginViewBase.h" #include "PointerLockController.h" #include "ProgressTracker.h" #include "RenderArena.h" @@ -1030,16 +1029,8 @@ void Page::dnsPrefetchingStateChanged() frame->document()->initDNSPrefetch(); } -void Page::privateBrowsingStateChanged() +void Page::collectPluginViews(Vector<RefPtr<PluginViewBase>, 32>& pluginViewBases) { - bool privateBrowsingEnabled = m_settings->privateBrowsingEnabled(); - - for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) - frame->document()->privateBrowsingStateDidChange(); - - // Collect the PluginViews in to a vector to ensure that action the plug-in takes - // from below privateBrowsingStateChanged does not affect their lifetime. - Vector<RefPtr<PluginViewBase>, 32> pluginViewBases; for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) { FrameView* view = frame->view(); if (!view) @@ -1055,6 +1046,33 @@ void Page::privateBrowsingStateChanged() pluginViewBases.append(static_cast<PluginViewBase*>(widget)); } } +} + +void Page::storageBlockingStateChanged() +{ + for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) + frame->document()->storageBlockingStateDidChange(); + + // Collect the PluginViews in to a vector to ensure that action the plug-in takes + // from below storageBlockingStateChanged does not affect their lifetime. + Vector<RefPtr<PluginViewBase>, 32> pluginViewBases; + collectPluginViews(pluginViewBases); + + for (size_t i = 0; i < pluginViewBases.size(); ++i) + pluginViewBases[i]->storageBlockingStateChanged(); +} + +void Page::privateBrowsingStateChanged() +{ + bool privateBrowsingEnabled = m_settings->privateBrowsingEnabled(); + + for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) + frame->document()->privateBrowsingStateDidChange(); + + // Collect the PluginViews in to a vector to ensure that action the plug-in takes + // from below privateBrowsingStateChanged does not affect their lifetime. + Vector<RefPtr<PluginViewBase>, 32> pluginViewBases; + collectPluginViews(pluginViewBases); for (size_t i = 0; i < pluginViewBases.size(); ++i) pluginViewBases[i]->privateBrowsingStateChanged(privateBrowsingEnabled); |