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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 years, 6 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
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 { 867 {
868 ASSERT(frame()); 868 ASSERT(frame());
869 869
870 // If we are loading substitute data to replace an existing load, then 870 // If we are loading substitute data to replace an existing load, then
871 // inherit all of the properties of that original request. This way, 871 // inherit all of the properties of that original request. This way,
872 // reload will re-attempt the original request. It is essential that 872 // reload will re-attempt the original request. It is essential that
873 // we only do this when there is an unreachableURL since a non-empty 873 // we only do this when there is an unreachableURL since a non-empty
874 // unreachableURL informs FrameLoader::reload to load unreachableURL 874 // unreachableURL informs FrameLoader::reload to load unreachableURL
875 // instead of the currently loaded URL. 875 // instead of the currently loaded URL.
876 ResourceRequest request; 876 ResourceRequest request;
877 if (replace && !unreachableURL.isEmpty() && frame()->loader().provisionalDoc umentLoader()) 877 if (replace && !unreachableURL.isEmpty() && frame()->loader().provisionalDoc umentLoader()) {
878 request = frame()->loader().provisionalDocumentLoader()->originalRequest (); 878 request = frame()->loader().provisionalDocumentLoader()->originalRequest ();
879 request.setURL(baseURL); 879 request.setURL(baseURL);
880 } else {
881 request = ResourceRequest(baseURL, !this->parent());
882 }
880 883
881 FrameLoadRequest frameRequest(0, request, SubstituteData(data, mimeType, tex tEncoding, unreachableURL)); 884 FrameLoadRequest frameRequest(0, request, SubstituteData(data, mimeType, tex tEncoding, unreachableURL));
882 ASSERT(frameRequest.substituteData().isValid()); 885 ASSERT(frameRequest.substituteData().isValid());
883 frameRequest.setLockBackForwardList(replace); 886 frameRequest.setLockBackForwardList(replace);
884 frame()->loader().load(frameRequest); 887 frame()->loader().load(frameRequest);
885 } 888 }
886 889
887 void WebLocalFrameImpl::loadHTMLString(const WebData& data, const WebURL& baseUR L, const WebURL& unreachableURL, bool replace) 890 void WebLocalFrameImpl::loadHTMLString(const WebData& data, const WebURL& baseUR L, const WebURL& unreachableURL, bool replace)
888 { 891 {
889 ASSERT(frame()); 892 ASSERT(frame());
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 { 1897 {
1895 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner); 1898 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner);
1896 setWebCoreFrame(frame); 1899 setWebCoreFrame(frame);
1897 frame->tree().setName(name, fallbackName); 1900 frame->tree().setName(name, fallbackName);
1898 // May dispatch JS events; frame may be detached after this. 1901 // May dispatch JS events; frame may be detached after this.
1899 frame->init(); 1902 frame->init();
1900 return frame; 1903 return frame;
1901 } 1904 }
1902 1905
1903 } // namespace blink 1906 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698