OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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) 2009 Adam Barth. All rights reserved. | 4 * Copyright (C) 2009 Adam Barth. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef NavigationScheduler_h | 31 #ifndef NavigationScheduler_h |
32 #define NavigationScheduler_h | 32 #define NavigationScheduler_h |
33 | 33 |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "public/platform/WebScheduler.h" | 36 #include "public/platform/WebScheduler.h" |
37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
38 #include "wtf/HashMap.h" | 38 #include "wtf/HashMap.h" |
39 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
| 40 #include "wtf/OwnPtr.h" |
| 41 #include "wtf/PassOwnPtr.h" |
40 #include "wtf/PassRefPtr.h" | 42 #include "wtf/PassRefPtr.h" |
41 #include "wtf/text/WTFString.h" | 43 #include "wtf/text/WTFString.h" |
42 #include <memory> | |
43 | 44 |
44 namespace blink { | 45 namespace blink { |
45 | 46 |
46 class CancellableTaskFactory; | 47 class CancellableTaskFactory; |
47 class Document; | 48 class Document; |
48 class FormSubmission; | 49 class FormSubmission; |
49 class LocalFrame; | 50 class LocalFrame; |
50 class ScheduledNavigation; | 51 class ScheduledNavigation; |
51 | 52 |
52 class CORE_EXPORT NavigationScheduler final : public GarbageCollectedFinalized<N
avigationScheduler> { | 53 class CORE_EXPORT NavigationScheduler final : public GarbageCollectedFinalized<N
avigationScheduler> { |
(...skipping 25 matching lines...) Expand all Loading... |
78 | 79 |
79 bool shouldScheduleReload() const; | 80 bool shouldScheduleReload() const; |
80 bool shouldScheduleNavigation(const String& url) const; | 81 bool shouldScheduleNavigation(const String& url) const; |
81 | 82 |
82 void navigateTask(); | 83 void navigateTask(); |
83 void schedule(ScheduledNavigation*); | 84 void schedule(ScheduledNavigation*); |
84 | 85 |
85 static bool mustReplaceCurrentItem(LocalFrame* targetFrame); | 86 static bool mustReplaceCurrentItem(LocalFrame* targetFrame); |
86 | 87 |
87 Member<LocalFrame> m_frame; | 88 Member<LocalFrame> m_frame; |
88 std::unique_ptr<CancellableTaskFactory> m_navigateTaskFactory; | 89 OwnPtr<CancellableTaskFactory> m_navigateTaskFactory; |
89 Member<ScheduledNavigation> m_redirect; | 90 Member<ScheduledNavigation> m_redirect; |
90 WebScheduler::NavigatingFrameType m_frameType; // Exists because we can't de
ref m_frame in destructor. | 91 WebScheduler::NavigatingFrameType m_frameType; // Exists because we can't de
ref m_frame in destructor. |
91 }; | 92 }; |
92 | 93 |
93 class NavigationDisablerForBeforeUnload { | 94 class NavigationDisablerForBeforeUnload { |
94 WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload); | 95 WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload); |
95 STACK_ALLOCATED(); | 96 STACK_ALLOCATED(); |
96 public: | 97 public: |
97 NavigationDisablerForBeforeUnload() | 98 NavigationDisablerForBeforeUnload() |
98 { | 99 { |
(...skipping 25 matching lines...) Expand all Loading... |
124 } | 125 } |
125 static bool inUnloadHandler() { return !!s_inUnloadHandler; } | 126 static bool inUnloadHandler() { return !!s_inUnloadHandler; } |
126 | 127 |
127 private: | 128 private: |
128 static unsigned s_inUnloadHandler; | 129 static unsigned s_inUnloadHandler; |
129 }; | 130 }; |
130 | 131 |
131 } // namespace blink | 132 } // namespace blink |
132 | 133 |
133 #endif // NavigationScheduler_h | 134 #endif // NavigationScheduler_h |
OLD | NEW |