OLD | NEW |
---|---|
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 17 matching lines...) Expand all Loading... | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebFrame_h | 31 #ifndef WebFrame_h |
32 #define WebFrame_h | 32 #define WebFrame_h |
33 | 33 |
34 #include "WebCompositionUnderline.h" | 34 #include "WebCompositionUnderline.h" |
35 #include "WebHistoryItem.h" | 35 #include "WebHistoryItem.h" |
36 #include "WebIconURL.h" | 36 #include "WebIconURL.h" |
37 #include "WebNode.h" | 37 #include "WebNode.h" |
38 #include "WebSerializedScriptValue.h" | |
38 #include "WebURLLoaderOptions.h" | 39 #include "WebURLLoaderOptions.h" |
39 #include "public/platform/WebCanvas.h" | 40 #include "public/platform/WebCanvas.h" |
40 #include "public/platform/WebMessagePortChannel.h" | 41 #include "public/platform/WebMessagePortChannel.h" |
41 #include "public/platform/WebPrivateOwnPtr.h" | 42 #include "public/platform/WebPrivateOwnPtr.h" |
42 #include "public/platform/WebReferrerPolicy.h" | 43 #include "public/platform/WebReferrerPolicy.h" |
43 #include "public/platform/WebURL.h" | 44 #include "public/platform/WebURL.h" |
44 #include "public/platform/WebURLRequest.h" | 45 #include "public/platform/WebURLRequest.h" |
45 #include "public/web/WebTreeScopeType.h" | 46 #include "public/web/WebTreeScopeType.h" |
46 | 47 |
47 struct NPObject; | 48 struct NPObject; |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 | 342 |
342 // Returns the V8 context for associated with the main world and this | 343 // Returns the V8 context for associated with the main world and this |
343 // frame. There can be many V8 contexts associated with this frame, one for | 344 // frame. There can be many V8 contexts associated with this frame, one for |
344 // each isolated world and one for the main world. If you don't know what | 345 // each isolated world and one for the main world. If you don't know what |
345 // the "main world" or an "isolated world" is, then you probably shouldn't | 346 // the "main world" or an "isolated world" is, then you probably shouldn't |
346 // be calling this API. | 347 // be calling this API. |
347 virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0; | 348 virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0; |
348 | 349 |
349 // Navigation ---------------------------------------------------------- | 350 // Navigation ---------------------------------------------------------- |
350 | 351 |
352 // The type of load for a navigation. | |
353 // TODO(clamy): Return a WebFrameLoadType instead of a WebHistoryCommitType | |
354 // in DidCommitProvisionalLoad. | |
355 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.
| |
356 WebFrameLoadTypeStandard, | |
dcheng
2015/05/27 16:26:30
Then these can just be "Standard", "Forward", etc.
clamy
2015/05/29 14:41:50
Done.
| |
357 WebFrameLoadTypeBackForward, | |
358 WebFrameLoadTypeHistorySameDocument, | |
359 WebFrameLoadTypeReload, | |
360 WebFrameLoadTypeSame, // user loads same URL again (but not reload butto n) | |
361 WebFrameLoadTypeRedirectWithLockedBackForwardList, | |
362 WebFrameLoadTypeInitialInChildFrame, | |
363 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.
| |
364 WebFrameLoadTypeReloadFromOrigin, | |
dcheng
2015/05/27 16:26:30
How is this different from WebFrameLoadTypeReload?
clamy
2015/05/29 14:41:50
Done.
| |
365 }; | |
366 | |
367 virtual WebURLRequest RequestFromHistoryItem(const WebHistoryItem&, WebURLRe quest::CachePolicy) | |
dcheng
2015/05/27 16:26:30
Blink naming convention is lowerCamelCase for meth
clamy
2015/05/29 14:41:50
Done.
| |
368 const = 0; | |
369 virtual WebURLRequest RequestForReload(const WebHistoryItem&, WebFrameLoadTy pe, | |
370 const WebURL& overrideURL = WebURL()) const = 0; | |
371 virtual WebHistoryItem CurrentItem() const = 0; | |
372 | |
351 // Reload the current document. | 373 // Reload the current document. |
352 // True |ignoreCache| explicitly bypasses caches. | 374 // True |ignoreCache| explicitly bypasses caches. |
353 // False |ignoreCache| revalidates any existing cache entries. | 375 // False |ignoreCache| revalidates any existing cache entries. |
354 virtual void reload(bool ignoreCache = false) = 0; | 376 virtual void reload(bool ignoreCache = false) = 0; |
355 | 377 |
356 // This is used for situations where we want to reload a different URL becau se of a redirect. | 378 // This is used for situations where we want to reload a different URL becau se of a redirect. |
357 virtual void reloadWithOverrideURL(const WebURL& overrideUrl, bool ignoreCac he = false) = 0; | 379 virtual void reloadWithOverrideURL(const WebURL& overrideUrl, bool ignoreCac he = false) = 0; |
358 | 380 |
359 // Load the given URL. | 381 // Load the given URL. |
360 virtual void loadRequest(const WebURLRequest&) = 0; | 382 // TODO(clamy): Remove the reload, reloadWithOverrideURL and loadHistoryItem |
383 // functions once RenderFrame only calls loadRequest. | |
384 virtual void loadRequest(const WebURLRequest&, WebFrameLoadType = WebFrameLo adTypeStandard, | |
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.
| |
385 const WebHistoryItem& = WebHistoryItem()) = 0; | |
361 | 386 |
362 // Load the given history state, corresponding to a back/forward | 387 // Load the given history state, corresponding to a back/forward |
363 // navigation of a frame. Multiple frames may be navigated via separate call s. | 388 // navigation of a frame. Multiple frames may be navigated via separate call s. |
364 virtual void loadHistoryItem( | 389 virtual void loadHistoryItem( |
365 const WebHistoryItem&, | 390 const WebHistoryItem&, |
366 WebHistoryLoadType, | 391 WebHistoryLoadType, |
367 WebURLRequest::CachePolicy = WebURLRequest::UseProtocolCachePolicy) = 0; | 392 WebURLRequest::CachePolicy = WebURLRequest::UseProtocolCachePolicy) = 0; |
368 | 393 |
369 // Loads the given data with specific mime type and optional text | 394 // Loads the given data with specific mime type and optional text |
370 // encoding. For HTML data, baseURL indicates the security origin of | 395 // encoding. For HTML data, baseURL indicates the security origin of |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
732 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; | 757 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; |
733 }; | 758 }; |
734 | 759 |
735 #if BLINK_IMPLEMENTATION | 760 #if BLINK_IMPLEMENTATION |
736 Frame* toCoreFrame(const WebFrame*); | 761 Frame* toCoreFrame(const WebFrame*); |
737 #endif | 762 #endif |
738 | 763 |
739 } // namespace blink | 764 } // namespace blink |
740 | 765 |
741 #endif | 766 #endif |
OLD | NEW |