Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: third_party/WebKit/Source/platform/WebTaskRunner.h

Issue 2487493004: Support external task cancellation mechanisms in base::Callback::IsCancelled (Closed)
Patch Set: s/BindCancellationChecker/CallbackCancellationTraits/ Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebTaskRunner_h 5 #ifndef WebTaskRunner_h
6 #define WebTaskRunner_h 6 #define WebTaskRunner_h
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "public/platform/WebCommon.h" 9 #include "public/platform/WebCommon.h"
10 #include "public/platform/WebTraceLocation.h" 10 #include "public/platform/WebTraceLocation.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // This function is not thread safe. Call this on the thread that has posted 44 // This function is not thread safe. Call this on the thread that has posted
45 // the task. 45 // the task.
46 void cancel(); 46 void cancel();
47 47
48 TaskHandle(); 48 TaskHandle();
49 ~TaskHandle(); 49 ~TaskHandle();
50 50
51 TaskHandle(TaskHandle&&); 51 TaskHandle(TaskHandle&&);
52 TaskHandle& operator=(TaskHandle&&); 52 TaskHandle& operator=(TaskHandle&&);
53 53
54 class Runner;
55
54 private: 56 private:
55 class Runner;
56 friend class WebTaskRunner; 57 friend class WebTaskRunner;
57 58
58 explicit TaskHandle(RefPtr<Runner>); 59 explicit TaskHandle(RefPtr<Runner>);
59 RefPtr<Runner> m_runner; 60 RefPtr<Runner> m_runner;
60 }; 61 };
61 62
62 #endif 63 #endif
63 64
64 // The blink representation of a chromium SingleThreadTaskRunner. 65 // The blink representation of a chromium SingleThreadTaskRunner.
65 class BLINK_PLATFORM_EXPORT WebTaskRunner { 66 class BLINK_PLATFORM_EXPORT WebTaskRunner {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 WARN_UNUSED_RETURN; 140 WARN_UNUSED_RETURN;
140 TaskHandle postDelayedCancellableTask(const WebTraceLocation&, 141 TaskHandle postDelayedCancellableTask(const WebTraceLocation&,
141 std::unique_ptr<WTF::Closure>, 142 std::unique_ptr<WTF::Closure>,
142 long long delayMs) WARN_UNUSED_RETURN; 143 long long delayMs) WARN_UNUSED_RETURN;
143 #endif 144 #endif
144 }; 145 };
145 146
146 } // namespace blink 147 } // namespace blink
147 148
148 #endif // WebTaskRunner_h 149 #endif // WebTaskRunner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698