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

Side by Side Diff: Source/core/frame/DOMWindow.h

Issue 1085973003: Make error messages for cross-domain access OOPIF-friendly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DOMWindow_h 5 #ifndef DOMWindow_h
6 #define DOMWindow_h 6 #define DOMWindow_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/events/EventTarget.h" 9 #include "core/events/EventTarget.h"
10 #include "core/frame/DOMWindowBase64.h" 10 #include "core/frame/DOMWindowBase64.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void captureEvents() { } 174 void captureEvents() { }
175 void releaseEvents() { } 175 void releaseEvents() { }
176 176
177 // FIXME: This handles both window[index] and window.frames[index]. However, 177 // FIXME: This handles both window[index] and window.frames[index]. However,
178 // the spec exposes window.frames[index] across origins but not 178 // the spec exposes window.frames[index] across origins but not
179 // window[index]... 179 // window[index]...
180 DOMWindow* anonymousIndexedGetter(uint32_t) const; 180 DOMWindow* anonymousIndexedGetter(uint32_t) const;
181 181
182 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&); 182 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, const String& targetOrigin, LocalDOMWindow* source, ExceptionState&);
183 183
184 // FIXME: These should be non-virtual, but this is blocked on the security 184 String sanitizedCrossDomainAccessErrorMessage(LocalDOMWindow* callingWindow) ;
185 // origin replication work. 185 String crossDomainAccessErrorMessage(LocalDOMWindow* callingWindow);
186 virtual String sanitizedCrossDomainAccessErrorMessage(LocalDOMWindow* callin gWindow) = 0; 186 bool isInsecureScriptAccess(LocalDOMWindow& callingWindow, const String& url String);
187 virtual String crossDomainAccessErrorMessage(LocalDOMWindow* callingWindow) = 0;
188 virtual bool isInsecureScriptAccess(DOMWindow& callingWindow, const String& urlString);
189 187
190 // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e., 188 // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e.,
191 // when its document is no longer the document that is displayed in its 189 // when its document is no longer the document that is displayed in its
192 // frame), we would like to zero out m_frame to avoid being confused 190 // frame), we would like to zero out m_frame to avoid being confused
193 // by the document that is currently active in m_frame. 191 // by the document that is currently active in m_frame.
194 // See https://bugs.webkit.org/show_bug.cgi?id=62054 192 // See https://bugs.webkit.org/show_bug.cgi?id=62054
195 bool isCurrentlyDisplayedInFrame() const; 193 bool isCurrentlyDisplayedInFrame() const;
196 194
197 void resetLocation(); 195 void resetLocation();
198 196
(...skipping 25 matching lines...) Expand all
224 // implementation details to scripts. 222 // implementation details to scripts.
225 bool m_windowIsClosing; 223 bool m_windowIsClosing;
226 224
227 private: 225 private:
228 mutable RefPtrWillBeMember<Location> m_location; 226 mutable RefPtrWillBeMember<Location> m_location;
229 }; 227 };
230 228
231 } // namespace blink 229 } // namespace blink
232 230
233 #endif // DOMWindow_h 231 #endif // DOMWindow_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698