| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ | 30 #ifndef SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ |
| 31 #define SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ | 31 #define SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ |
| 32 | 32 |
| 33 #include "sky/engine/core/frame/FrameClient.h" | 33 #include "sky/engine/core/frame/FrameClient.h" |
| 34 #include "sky/engine/core/loader/FrameLoaderTypes.h" | 34 #include "sky/engine/core/loader/FrameLoaderTypes.h" |
| 35 #include "sky/engine/core/loader/NavigationPolicy.h" | 35 #include "sky/engine/core/loader/NavigationPolicy.h" |
| 36 #include "sky/engine/platform/network/ResourceLoadPriority.h" | |
| 37 #include "sky/engine/platform/weborigin/Referrer.h" | 36 #include "sky/engine/platform/weborigin/Referrer.h" |
| 38 #include "sky/engine/wtf/Forward.h" | 37 #include "sky/engine/wtf/Forward.h" |
| 39 #include "sky/engine/wtf/Vector.h" | 38 #include "sky/engine/wtf/Vector.h" |
| 40 | 39 |
| 41 typedef struct _Dart_Isolate* Dart_Isolate; | 40 typedef struct _Dart_Isolate* Dart_Isolate; |
| 42 | 41 |
| 43 namespace mojo { | 42 namespace mojo { |
| 44 class View; | 43 class View; |
| 45 } | 44 } |
| 46 | 45 |
| 47 namespace blink { | 46 namespace blink { |
| 48 | 47 |
| 49 class Color; | 48 class Color; |
| 50 class Document; | 49 class Document; |
| 51 class DOMWindowExtension; | 50 class DOMWindowExtension; |
| 52 class DOMWrapperWorld; | 51 class DOMWrapperWorld; |
| 53 class Element; | 52 class Element; |
| 54 class FetchRequest; | 53 class FetchRequest; |
| 55 class FrameLoader; | 54 class FrameLoader; |
| 56 class FrameNetworkingContext; | 55 class FrameNetworkingContext; |
| 57 class IntRect; | 56 class IntRect; |
| 58 class IntSize; | 57 class IntSize; |
| 59 class KURL; | 58 class KURL; |
| 60 class LocalFrame; | 59 class LocalFrame; |
| 61 class Page; | 60 class Page; |
| 62 class RemoteFrame; | 61 class RemoteFrame; |
| 63 class ResourceError; | |
| 64 class ResourceHandle; | 62 class ResourceHandle; |
| 65 class ResourceRequest; | 63 class ResourceRequest; |
| 66 class ResourceResponse; | 64 class ResourceResponse; |
| 67 class SharedBuffer; | 65 class SharedBuffer; |
| 68 class Widget; | 66 class Widget; |
| 69 | 67 |
| 70 class FrameLoaderClient : public FrameClient { | 68 class FrameLoaderClient : public FrameClient { |
| 71 public: | 69 public: |
| 72 virtual ~FrameLoaderClient() { } | 70 virtual ~FrameLoaderClient() { } |
| 73 | 71 |
| 74 virtual void detachedFromParent() = 0; | 72 virtual void detachedFromParent() = 0; |
| 75 | 73 |
| 76 virtual void dispatchWillSendRequest(Document*, unsigned long identifier
, ResourceRequest&, const ResourceResponse& redirectResponse) = 0; | 74 virtual void dispatchWillSendRequest(Document*, unsigned long identifier
, ResourceRequest&, const ResourceResponse& redirectResponse) = 0; |
| 77 virtual void dispatchDidReceiveResponse(Document*, unsigned long identif
ier, const ResourceResponse&) = 0; | 75 virtual void dispatchDidReceiveResponse(Document*, unsigned long identif
ier, const ResourceResponse&) = 0; |
| 78 virtual void dispatchDidFinishLoading(Document*, unsigned long identifie
r) = 0; | 76 virtual void dispatchDidFinishLoading(Document*, unsigned long identifie
r) = 0; |
| 79 virtual void dispatchDidLoadResourceFromMemoryCache(const ResourceReques
t&, const ResourceResponse&) = 0; | 77 virtual void dispatchDidLoadResourceFromMemoryCache(const ResourceReques
t&, const ResourceResponse&) = 0; |
| 80 | 78 |
| 81 virtual void dispatchDidHandleOnloadEvents() = 0; | 79 virtual void dispatchDidHandleOnloadEvents() = 0; |
| 82 virtual void dispatchWillClose() = 0; | 80 virtual void dispatchWillClose() = 0; |
| 83 virtual void dispatchDidReceiveTitle(const String&) = 0; | 81 virtual void dispatchDidReceiveTitle(const String&) = 0; |
| 84 virtual void dispatchDidFailLoad(const ResourceError&) = 0; | |
| 85 | 82 |
| 86 virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest
&, Document*, NavigationPolicy, bool isTransitionNavigation) = 0; | 83 virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest
&, Document*, NavigationPolicy, bool isTransitionNavigation) = 0; |
| 87 | 84 |
| 88 virtual void dispatchAddNavigationTransitionData(const String& origin, c
onst String& selector, const String& markup) { } | 85 virtual void dispatchAddNavigationTransitionData(const String& origin, c
onst String& selector, const String& markup) { } |
| 89 virtual void dispatchWillRequestResource(FetchRequest*) { } | 86 virtual void dispatchWillRequestResource(FetchRequest*) { } |
| 90 | 87 |
| 91 virtual void didStartLoading(LoadStartType) = 0; | 88 virtual void didStartLoading(LoadStartType) = 0; |
| 92 virtual void progressEstimateChanged(double progressEstimate) = 0; | 89 virtual void progressEstimateChanged(double progressEstimate) = 0; |
| 93 virtual void didStopLoading() = 0; | 90 virtual void didStopLoading() = 0; |
| 94 | 91 |
| 95 virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy,
const String& suggestedName = String()) = 0; | 92 virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy,
const String& suggestedName = String()) = 0; |
| 96 | 93 |
| 97 virtual mojo::View* createChildFrame() = 0; | 94 virtual mojo::View* createChildFrame() = 0; |
| 98 | 95 |
| 99 // Transmits the change in the set of watched CSS selectors property | 96 // Transmits the change in the set of watched CSS selectors property |
| 100 // that match any element on the frame. | 97 // that match any element on the frame. |
| 101 virtual void selectorMatchChanged(const Vector<String>& addedSelectors,
const Vector<String>& removedSelectors) = 0; | 98 virtual void selectorMatchChanged(const Vector<String>& addedSelectors,
const Vector<String>& removedSelectors) = 0; |
| 102 | 99 |
| 103 virtual void transitionToCommittedForNewPage() = 0; | 100 virtual void transitionToCommittedForNewPage() = 0; |
| 104 | 101 |
| 105 | 102 |
| 106 virtual void documentElementAvailable() = 0; | 103 virtual void documentElementAvailable() = 0; |
| 107 | 104 |
| 108 // Informs the embedder that a WebGL canvas inside this frame received a
lost context | 105 // Informs the embedder that a WebGL canvas inside this frame received a
lost context |
| 109 // notification with the given GL_ARB_robustness guilt/innocence code (s
ee Extensions3D.h). | 106 // notification with the given GL_ARB_robustness guilt/innocence code (s
ee Extensions3D.h). |
| 110 virtual void didLoseWebGLContext(int) { } | 107 virtual void didLoseWebGLContext(int) { } |
| 111 | 108 |
| 112 virtual void dispatchDidChangeResourcePriority(unsigned long identifier,
ResourceLoadPriority, int intraPriorityValue) { } | |
| 113 | |
| 114 virtual void dispatchDidChangeManifest() { } | 109 virtual void dispatchDidChangeManifest() { } |
| 115 | 110 |
| 116 virtual bool isFrameLoaderClientImpl() const { return false; } | 111 virtual bool isFrameLoaderClientImpl() const { return false; } |
| 117 virtual void didCreateIsolate(Dart_Isolate isolate) {} | 112 virtual void didCreateIsolate(Dart_Isolate isolate) {} |
| 118 }; | 113 }; |
| 119 | 114 |
| 120 } // namespace blink | 115 } // namespace blink |
| 121 | 116 |
| 122 #endif // SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ | 117 #endif // SKY_ENGINE_CORE_LOADER_FRAMELOADERCLIENT_H_ |
| OLD | NEW |