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

Unified Diff: public/web/WebFrame.h

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed issue with inital history navigation in child frames Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« Source/core/loader/FrameLoaderTypes.h ('K') | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebFrame.h
diff --git a/public/web/WebFrame.h b/public/web/WebFrame.h
index f43e83601d011dc08a36a9e62232b35d555a28a6..5f14c0c91fe87a0b4304ce0e7dc019818a3d171c 100644
--- a/public/web/WebFrame.h
+++ b/public/web/WebFrame.h
@@ -35,6 +35,7 @@
#include "WebHistoryItem.h"
#include "WebIconURL.h"
#include "WebNode.h"
+#include "WebSerializedScriptValue.h"
#include "WebURLLoaderOptions.h"
#include "public/platform/WebCanvas.h"
#include "public/platform/WebMessagePortChannel.h"
@@ -348,6 +349,27 @@ public:
// Navigation ----------------------------------------------------------
+ // The type of load for a navigation.
+ // TODO(clamy): Return a WebFrameLoadType instead of a WebHistoryCommitType
+ // in DidCommitProvisionalLoad.
+ enum WebFrameLoadType {
dcheng 2015/05/27 16:26:30 enum class for new enums please. Consider just mov
clamy 2015/05/29 14:41:50 Done.
+ WebFrameLoadTypeStandard,
dcheng 2015/05/27 16:26:30 Then these can just be "Standard", "Forward", etc.
clamy 2015/05/29 14:41:50 Done.
+ WebFrameLoadTypeBackForward,
+ WebFrameLoadTypeHistorySameDocument,
+ WebFrameLoadTypeReload,
+ WebFrameLoadTypeSame, // user loads same URL again (but not reload button)
+ WebFrameLoadTypeRedirectWithLockedBackForwardList,
+ WebFrameLoadTypeInitialInChildFrame,
+ WebFrameLoadTypeInitialHistoryLoad,
dcheng 2015/05/27 16:26:30 Since we're adding comments anyway... what's the "
clamy 2015/05/29 14:41:50 Done.
+ WebFrameLoadTypeReloadFromOrigin,
dcheng 2015/05/27 16:26:30 How is this different from WebFrameLoadTypeReload?
clamy 2015/05/29 14:41:50 Done.
+ };
+
+ virtual WebURLRequest RequestFromHistoryItem(const WebHistoryItem&, WebURLRequest::CachePolicy)
dcheng 2015/05/27 16:26:30 Blink naming convention is lowerCamelCase for meth
clamy 2015/05/29 14:41:50 Done.
+ const = 0;
+ virtual WebURLRequest RequestForReload(const WebHistoryItem&, WebFrameLoadType,
+ const WebURL& overrideURL = WebURL()) const = 0;
+ virtual WebHistoryItem CurrentItem() const = 0;
+
// Reload the current document.
// True |ignoreCache| explicitly bypasses caches.
// False |ignoreCache| revalidates any existing cache entries.
@@ -357,7 +379,10 @@ public:
virtual void reloadWithOverrideURL(const WebURL& overrideUrl, bool ignoreCache = false) = 0;
// Load the given URL.
- virtual void loadRequest(const WebURLRequest&) = 0;
+ // TODO(clamy): Remove the reload, reloadWithOverrideURL and loadHistoryItem
+ // functions once RenderFrame only calls loadRequest.
+ virtual void loadRequest(const WebURLRequest&, WebFrameLoadType = WebFrameLoadTypeStandard,
dcheng 2015/05/27 16:26:30 It seems like all the newly added methods should o
clamy 2015/05/29 14:41:50 Done.
+ const WebHistoryItem& = WebHistoryItem()) = 0;
// Load the given history state, corresponding to a back/forward
// navigation of a frame. Multiple frames may be navigated via separate calls.
« Source/core/loader/FrameLoaderTypes.h ('K') | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698