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

Side by Side Diff: Source/core/loader/appcache/ApplicationCacheHost.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed 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/core/loader/TextResourceDecoderBuilder.cpp ('k') | Source/core/page/CreateWindow.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (!isApplicationCacheEnabled()) 81 if (!isApplicationCacheEnabled())
82 return; 82 return;
83 83
84 ASSERT(m_documentLoader->frame()); 84 ASSERT(m_documentLoader->frame());
85 LocalFrame& frame = *m_documentLoader->frame(); 85 LocalFrame& frame = *m_documentLoader->frame();
86 m_host = frame.loader().client()->createApplicationCacheHost(this); 86 m_host = frame.loader().client()->createApplicationCacheHost(this);
87 if (m_host) { 87 if (m_host) {
88 WrappedResourceRequest wrapped(request); 88 WrappedResourceRequest wrapped(request);
89 89
90 const WebApplicationCacheHost* spawningHost = 0; 90 const WebApplicationCacheHost* spawningHost = 0;
91 LocalFrame* spawningFrame = frame.tree().parent(); 91 Frame* spawningFrame = frame.tree().parent();
92 if (!spawningFrame) 92 if (!spawningFrame || !spawningFrame->isLocalFrame())
93 spawningFrame = frame.loader().opener(); 93 spawningFrame = frame.loader().opener();
94 if (!spawningFrame) 94 if (!spawningFrame || !spawningFrame->isLocalFrame())
95 spawningFrame = &frame; 95 spawningFrame = &frame;
96 if (DocumentLoader* spawningDocLoader = spawningFrame->loader().document Loader()) 96 if (DocumentLoader* spawningDocLoader = toLocalFrame(spawningFrame)->loa der().documentLoader())
97 spawningHost = spawningDocLoader->applicationCacheHost() ? spawningD ocLoader->applicationCacheHost()->m_host.get() : 0; 97 spawningHost = spawningDocLoader->applicationCacheHost() ? spawningD ocLoader->applicationCacheHost()->m_host.get() : 0;
98 98
99 m_host->willStartMainResourceRequest(wrapped, spawningHost); 99 m_host->willStartMainResourceRequest(wrapped, spawningHost);
100 } 100 }
101 101
102 // NOTE: The semantics of this method, and others in this interface, are sub tly different 102 // NOTE: The semantics of this method, and others in this interface, are sub tly different
103 // than the method names would suggest. For example, in this method never re turns an appcached 103 // than the method names would suggest. For example, in this method never re turns an appcached
104 // response in the SubstituteData out argument, instead we return the appcac hed response thru 104 // response in the SubstituteData out argument, instead we return the appcac hed response thru
105 // the usual resource loading pipeline. 105 // the usual resource loading pipeline.
106 } 106 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 { 271 {
272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W ebApplicationCacheHost::UnknownError, String(), 0, String()); 272 notifyApplicationCache(PROGRESS_EVENT, progressTotal, progressDone, blink::W ebApplicationCacheHost::UnknownError, String(), 0, String());
273 } 273 }
274 274
275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt ring& message) 275 void ApplicationCacheHost::notifyErrorEventListener(blink::WebApplicationCacheHo st::ErrorReason reason, const blink::WebURL& url, int status, const blink::WebSt ring& message)
276 { 276 {
277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess age); 277 notifyApplicationCache(ERROR_EVENT, 0, 0, reason, url.string(), status, mess age);
278 } 278 }
279 279
280 } // namespace WebCore 280 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/TextResourceDecoderBuilder.cpp ('k') | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698