| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 5 * Copyright (C) 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ | 32 #ifndef SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ |
| 33 #define SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ | 33 #define SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ |
| 34 | 34 |
| 35 #include "sky/engine/core/fetch/ResourceLoaderOptions.h" | |
| 36 #include "sky/engine/core/loader/FrameLoaderTypes.h" | 35 #include "sky/engine/core/loader/FrameLoaderTypes.h" |
| 37 #include "sky/engine/platform/Timer.h" | 36 #include "sky/engine/platform/Timer.h" |
| 38 #include "sky/engine/platform/network/ResourceRequest.h" | 37 #include "sky/engine/platform/network/ResourceRequest.h" |
| 39 #include "sky/engine/wtf/Forward.h" | 38 #include "sky/engine/wtf/Forward.h" |
| 40 #include "sky/engine/wtf/HashSet.h" | 39 #include "sky/engine/wtf/HashSet.h" |
| 41 #include "sky/engine/wtf/OwnPtr.h" | 40 #include "sky/engine/wtf/OwnPtr.h" |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 class Chrome; | 44 class Chrome; |
| 46 class DOMWrapperWorld; | 45 class DOMWrapperWorld; |
| 47 class Document; | 46 class Document; |
| 48 class Event; | 47 class Event; |
| 49 class FetchContext; | |
| 50 class Frame; | 48 class Frame; |
| 51 class FrameLoaderClient; | 49 class FrameLoaderClient; |
| 52 class LocalFrame; | 50 class LocalFrame; |
| 53 class NavigationAction; | 51 class NavigationAction; |
| 54 class Page; | 52 class Page; |
| 55 class ResourceError; | 53 class ResourceError; |
| 56 class ResourceResponse; | 54 class ResourceResponse; |
| 57 | 55 |
| 58 class FrameLoader { | 56 class FrameLoader { |
| 59 WTF_MAKE_NONCOPYABLE(FrameLoader); | 57 WTF_MAKE_NONCOPYABLE(FrameLoader); |
| 60 public: | 58 public: |
| 61 FrameLoader(LocalFrame*); | 59 FrameLoader(LocalFrame*); |
| 62 ~FrameLoader(); | 60 ~FrameLoader(); |
| 63 | 61 |
| 64 void init(); | 62 void init(); |
| 65 | 63 |
| 66 LocalFrame* frame() const { return m_frame; } | 64 LocalFrame* frame() const { return m_frame; } |
| 67 | 65 |
| 68 static void reportLocalLoadFailed(LocalFrame*, const String& url); | 66 static void reportLocalLoadFailed(LocalFrame*, const String& url); |
| 69 | 67 |
| 70 // FIXME: These are all functions which stop loads. We have too many. | 68 // FIXME: These are all functions which stop loads. We have too many. |
| 71 // Warning: stopAllLoaders can and will detach the LocalFrame out from under
you. All callers need to either protect the LocalFrame | 69 // Warning: stopAllLoaders can and will detach the LocalFrame out from under
you. All callers need to either protect the LocalFrame |
| 72 // or guarantee they won't in any way access the LocalFrame after stopAllLoa
ders returns. | 70 // or guarantee they won't in any way access the LocalFrame after stopAllLoa
ders returns. |
| 73 void stopAllLoaders(); | 71 void stopAllLoaders(); |
| 74 void stopLoading(); | 72 void stopLoading(); |
| 75 bool closeURL(); | 73 bool closeURL(); |
| 76 // FIXME: clear() is trying to do too many things. We should break it down i
nto smaller functions. | 74 // FIXME: clear() is trying to do too many things. We should break it down i
nto smaller functions. |
| 77 void clear(); | 75 void clear(); |
| 78 | 76 |
| 79 FetchContext& fetchContext() const { return *m_fetchContext; } | |
| 80 | |
| 81 void finishedParsing(); | 77 void finishedParsing(); |
| 82 | 78 |
| 83 private: | 79 private: |
| 84 LocalFrame* m_frame; | 80 LocalFrame* m_frame; |
| 85 | 81 |
| 86 OwnPtr<FetchContext> m_fetchContext; | |
| 87 | |
| 88 bool m_inStopAllLoaders; | 82 bool m_inStopAllLoaders; |
| 89 }; | 83 }; |
| 90 | 84 |
| 91 } // namespace blink | 85 } // namespace blink |
| 92 | 86 |
| 93 #endif // SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ | 87 #endif // SKY_ENGINE_CORE_LOADER_FRAMELOADER_H_ |
| OLD | NEW |