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

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

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: Rebase and address comments. Created 3 years, 10 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/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index da76ba78d623c0e4eed0bfba26b55273909777ca..605629c0d2e388d836648bcce9eb947b15e54d8e 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -53,6 +53,7 @@
#include "core/frame/BarProp.h"
#include "core/frame/DOMVisualViewport.h"
#include "core/frame/EventHandlerRegistry.h"
+#include "core/frame/External.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameView.h"
#include "core/frame/History.h"
@@ -86,6 +87,7 @@
#include "platform/weborigin/Suborigin.h"
#include "public/platform/Platform.h"
#include "public/platform/WebScreenInfo.h"
+
#include <memory>
namespace blink {
@@ -1380,6 +1382,20 @@ CustomElementRegistry* LocalDOMWindow::maybeCustomElements() const {
return m_customElements;
}
+External* LocalDOMWindow::external() {
+ if (!m_external)
+ m_external = new External;
+ return m_external;
+}
+
+bool LocalDOMWindow::isSecureContext() const {
+ if (!frame())
+ return false;
+
+ return document()->isSecureContext(
+ ExecutionContext::StandardSecureContextCheck);
+}
+
void LocalDOMWindow::addedEventListener(
const AtomicString& eventType,
RegisteredEventListener& registeredListener) {
@@ -1607,6 +1623,7 @@ DEFINE_TRACE(LocalDOMWindow) {
visitor->trace(m_navigator);
visitor->trace(m_media);
visitor->trace(m_customElements);
+ visitor->trace(m_external);
visitor->trace(m_applicationCache);
visitor->trace(m_eventQueue);
visitor->trace(m_postMessageTimers);
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698