| 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" | |
| 42 #include "wtf/PassRefPtr.h" | 40 #include "wtf/PassRefPtr.h" |
| 43 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 42 #include <memory> |
| 44 | 43 |
| 45 namespace blink { | 44 namespace blink { |
| 46 | 45 |
| 47 class CancellableTaskFactory; | 46 class CancellableTaskFactory; |
| 48 class Document; | 47 class Document; |
| 49 class FormSubmission; | 48 class FormSubmission; |
| 50 class LocalFrame; | 49 class LocalFrame; |
| 51 class ScheduledNavigation; | 50 class ScheduledNavigation; |
| 52 | 51 |
| 53 class CORE_EXPORT NavigationScheduler final : public GarbageCollectedFinalized<N
avigationScheduler> { | 52 class CORE_EXPORT NavigationScheduler final : public GarbageCollectedFinalized<N
avigationScheduler> { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 79 | 78 |
| 80 bool shouldScheduleReload() const; | 79 bool shouldScheduleReload() const; |
| 81 bool shouldScheduleNavigation(const String& url) const; | 80 bool shouldScheduleNavigation(const String& url) const; |
| 82 | 81 |
| 83 void navigateTask(); | 82 void navigateTask(); |
| 84 void schedule(ScheduledNavigation*); | 83 void schedule(ScheduledNavigation*); |
| 85 | 84 |
| 86 static bool mustReplaceCurrentItem(LocalFrame* targetFrame); | 85 static bool mustReplaceCurrentItem(LocalFrame* targetFrame); |
| 87 | 86 |
| 88 Member<LocalFrame> m_frame; | 87 Member<LocalFrame> m_frame; |
| 89 OwnPtr<CancellableTaskFactory> m_navigateTaskFactory; | 88 std::unique_ptr<CancellableTaskFactory> m_navigateTaskFactory; |
| 90 Member<ScheduledNavigation> m_redirect; | 89 Member<ScheduledNavigation> m_redirect; |
| 91 WebScheduler::NavigatingFrameType m_frameType; // Exists because we can't de
ref m_frame in destructor. | 90 WebScheduler::NavigatingFrameType m_frameType; // Exists because we can't de
ref m_frame in destructor. |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 class NavigationDisablerForBeforeUnload { | 93 class NavigationDisablerForBeforeUnload { |
| 95 WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload); | 94 WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload); |
| 96 STACK_ALLOCATED(); | 95 STACK_ALLOCATED(); |
| 97 public: | 96 public: |
| 98 NavigationDisablerForBeforeUnload() | 97 NavigationDisablerForBeforeUnload() |
| 99 { | 98 { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 125 } | 124 } |
| 126 static bool inUnloadHandler() { return !!s_inUnloadHandler; } | 125 static bool inUnloadHandler() { return !!s_inUnloadHandler; } |
| 127 | 126 |
| 128 private: | 127 private: |
| 129 static unsigned s_inUnloadHandler; | 128 static unsigned s_inUnloadHandler; |
| 130 }; | 129 }; |
| 131 | 130 |
| 132 } // namespace blink | 131 } // namespace blink |
| 133 | 132 |
| 134 #endif // NavigationScheduler_h | 133 #endif // NavigationScheduler_h |
| OLD | NEW |