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

Side by Side Diff: third_party/WebKit/Source/core/frame/Location.cpp

Issue 2772753002: Change FrameLoadTypeReload to take FrameLoadTypeReloadMainResource's behavior (Closed)
Patch Set: rebase error fix (replace newly added ReloadMainResource) Created 3 years, 9 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 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 ExceptionState& exceptionState) { 211 ExceptionState& exceptionState) {
212 setLocation(url, currentWindow, enteredWindow, &exceptionState, 212 setLocation(url, currentWindow, enteredWindow, &exceptionState,
213 SetLocationPolicy::ReplaceThisFrame); 213 SetLocationPolicy::ReplaceThisFrame);
214 } 214 }
215 215
216 void Location::reload(LocalDOMWindow* currentWindow) { 216 void Location::reload(LocalDOMWindow* currentWindow) {
217 if (!isAttached()) 217 if (!isAttached())
218 return; 218 return;
219 if (document()->url().protocolIsJavaScript()) 219 if (document()->url().protocolIsJavaScript())
220 return; 220 return;
221 m_domWindow->frame()->reload(FrameLoadTypeReloadMainResource, 221 m_domWindow->frame()->reload(FrameLoadTypeReload,
222 ClientRedirectPolicy::ClientRedirect); 222 ClientRedirectPolicy::ClientRedirect);
223 } 223 }
224 224
225 void Location::setLocation(const String& url, 225 void Location::setLocation(const String& url,
226 LocalDOMWindow* currentWindow, 226 LocalDOMWindow* currentWindow,
227 LocalDOMWindow* enteredWindow, 227 LocalDOMWindow* enteredWindow,
228 ExceptionState* exceptionState, 228 ExceptionState* exceptionState,
229 SetLocationPolicy setLocationPolicy) { 229 SetLocationPolicy setLocationPolicy) {
230 if (!isAttached()) 230 if (!isAttached())
231 return; 231 return;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 Document* Location::document() const { 278 Document* Location::document() const {
279 return toLocalDOMWindow(m_domWindow)->document(); 279 return toLocalDOMWindow(m_domWindow)->document();
280 } 280 }
281 281
282 bool Location::isAttached() const { 282 bool Location::isAttached() const {
283 return m_domWindow->frame(); 283 return m_domWindow->frame();
284 } 284 }
285 285
286 } // namespace blink 286 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698