Chromium Code Reviews| 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. |