OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 | 89 |
90 LocalFrame* frame() const { return m_frame; } | 90 LocalFrame* frame() const { return m_frame; } |
91 | 91 |
92 ResourceTimingInfo* getNavigationTimingInfo() const; | 92 ResourceTimingInfo* getNavigationTimingInfo() const; |
93 | 93 |
94 virtual void detachFromFrame(); | 94 virtual void detachFromFrame(); |
95 | 95 |
96 unsigned long mainResourceIdentifier() const; | 96 unsigned long mainResourceIdentifier() const; |
97 | 97 |
98 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, | 98 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, |
99 const String& source); | 99 const String& source, |
100 SecurityOrigin* frameSecurityO rigin); | |
dcheng
2017/04/04 07:53:21
Please clang-format the cl
(the presubmit should
andypaicu
2017/04/04 14:15:28
Good catch. My presubmit did not raise any warning
| |
100 | 101 |
101 const AtomicString& mimeType() const; | 102 const AtomicString& mimeType() const; |
102 | 103 |
103 const ResourceRequest& originalRequest() const; | 104 const ResourceRequest& originalRequest() const; |
104 | 105 |
105 const ResourceRequest& getRequest() const; | 106 const ResourceRequest& getRequest() const; |
106 | 107 |
107 ResourceFetcher* fetcher() const { return m_fetcher.get(); } | 108 ResourceFetcher* fetcher() const { return m_fetcher.get(); } |
108 | 109 |
109 void setSubresourceFilter(SubresourceFilter*); | 110 void setSubresourceFilter(SubresourceFilter*); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
214 void loadFailed(const ResourceError&); | 215 void loadFailed(const ResourceError&); |
215 | 216 |
216 DECLARE_VIRTUAL_TRACE(); | 217 DECLARE_VIRTUAL_TRACE(); |
217 | 218 |
218 protected: | 219 protected: |
219 DocumentLoader(LocalFrame*, | 220 DocumentLoader(LocalFrame*, |
220 const ResourceRequest&, | 221 const ResourceRequest&, |
221 const SubstituteData&, | 222 const SubstituteData&, |
222 ClientRedirectPolicy); | 223 ClientRedirectPolicy); |
223 | 224 |
225 static bool shouldClearWindowName( | |
226 const LocalFrame&, | |
227 SecurityOrigin* frameSecurityOrigin, | |
228 const Document& newDocument); | |
229 | |
224 Vector<KURL> m_redirectChain; | 230 Vector<KURL> m_redirectChain; |
225 | 231 |
226 private: | 232 private: |
227 // installNewDocument() does the work of creating a Document and | 233 // installNewDocument() does the work of creating a Document and |
228 // DocumentWriter, as well as creating a new LocalDOMWindow if needed. It also | 234 // DocumentWriter, as well as creating a new LocalDOMWindow if needed. It also |
229 // initalizes a bunch of state on the Document (e.g., the state based on | 235 // initalizes a bunch of state on the Document (e.g., the state based on |
230 // response headers). | 236 // response headers). |
231 enum class InstallNewDocumentReason { kNavigation, kJavascriptURL }; | 237 enum class InstallNewDocumentReason { kNavigation, kJavascriptURL }; |
232 void installNewDocument(const DocumentInit&, | 238 void installNewDocument(const DocumentInit&, |
233 const AtomicString& mimeType, | 239 const AtomicString& mimeType, |
234 const AtomicString& encoding, | 240 const AtomicString& encoding, |
235 InstallNewDocumentReason, | 241 InstallNewDocumentReason, |
236 ParserSynchronizationPolicy, | 242 ParserSynchronizationPolicy, |
237 const KURL& overridingURL); | 243 const KURL& overridingURL, |
244 SecurityOrigin* frameSecurityOrigin); | |
238 void didInstallNewDocument(Document*); | 245 void didInstallNewDocument(Document*); |
239 void didCommitNavigation(); | 246 void didCommitNavigation(); |
240 | 247 |
241 void ensureWriter(const AtomicString& mimeType, | 248 void ensureWriter(const AtomicString& mimeType, |
242 const KURL& overridingURL = KURL()); | 249 const KURL& overridingURL = KURL()); |
243 void endWriting(); | 250 void endWriting(); |
244 | 251 |
245 // Use these method only where it's guaranteed that |m_frame| hasn't been | 252 // Use these method only where it's guaranteed that |m_frame| hasn't been |
246 // cleared. | 253 // cleared. |
247 FrameLoader& frameLoader() const; | 254 FrameLoader& frameLoader() const; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 // Used to protect against reentrancy into dataReceived(). | 355 // Used to protect against reentrancy into dataReceived(). |
349 bool m_inDataReceived; | 356 bool m_inDataReceived; |
350 RefPtr<SharedBuffer> m_dataBuffer; | 357 RefPtr<SharedBuffer> m_dataBuffer; |
351 }; | 358 }; |
352 | 359 |
353 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 360 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
354 | 361 |
355 } // namespace blink | 362 } // namespace blink |
356 | 363 |
357 #endif // DocumentLoader_h | 364 #endif // DocumentLoader_h |
OLD | NEW |