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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 1340343003: scheduler: Implement WebFrameScheduler and WebPageScheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + fixed gn build. Created 5 years, 3 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/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 8951fe2f267717a56e37cff755ff3f4a80e0f8ab..def62f7a800d391e54a03564c9502d9862894565 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -73,6 +73,9 @@
#include "platform/graphics/paint/ClipRecorder.h"
#include "platform/graphics/paint/SkPictureBuilder.h"
#include "platform/text/TextStream.h"
+#include "public/platform/WebFrameHostScheduler.h"
+#include "public/platform/WebFrameScheduler.h"
+#include "public/platform/WebSecurityOrigin.h"
#include "third_party/skia/include/core/SkImage.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/StdLibExtras.h"
@@ -282,6 +285,7 @@ void LocalFrame::detach(FrameDetachType type)
m_loader.stopAllLoaders();
m_loader.dispatchUnloadEvent();
detachChildren();
+ m_frameScheduler.clear();
// All done if detaching the subframes brought about a detach of this frame also.
if (!client())
@@ -858,6 +862,25 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
}
+WebFrameScheduler* LocalFrame::frameScheduler()
+{
+ if (!m_frameScheduler.get())
+ m_frameScheduler = adoptPtr(host()->frameHostScheduler()->createFrameScheduler());
+
+ ASSERT(m_frameScheduler.get());
+ return m_frameScheduler.get();
+}
+
+void LocalFrame::updateFrameSecurityOrigin()
+{
+ SecurityContext* context = securityContext();
+ if (!context)
+ return;
+
+ WebSecurityOrigin securityOrigin(context->securityOrigin());
+ frameScheduler()->setFrameOrigin(&securityOrigin);
+}
+
DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698