Index: base/message_loop/high_priority_task_runner.h |
diff --git a/base/message_loop/high_priority_task_runner.h b/base/message_loop/high_priority_task_runner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cab9fb4b3580f739b091bb713b1394bea11089be |
--- /dev/null |
+++ b/base/message_loop/high_priority_task_runner.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BASE_MESSAGE_LOOP_HIGH_PRIORITY_TASK_RUNNER_H_ |
+#define BASE_MESSAGE_LOOP_HIGH_PRIORITY_TASK_RUNNER_H_ |
+ |
+#include "base/base_export.h" |
+#include "base/callback_forward.h" |
+#include "base/memory/ref_counted.h" |
+ |
+namespace tracked_objects { |
+class Location; |
+} // namespace tracked_objects |
+ |
+namespace base { |
+ |
+namespace internal { |
+class IncomingTaskQueue; |
+} |
+ |
+class MessageLoop; |
+class TaskQueue; |
+ |
+class BASE_EXPORT HighPriorityTaskRunner |
+ : public RefCountedThreadSafe<HighPriorityTaskRunner> { |
+ public: |
+ explicit HighPriorityTaskRunner(MessageLoop* message_loop); |
+ |
+ void PostTask(const tracked_objects::Location& from_here, |
+ const Closure& task); |
+ |
+ void ReloadWorkQueue(TaskQueue* target_work_queue); |
+ |
+ private: |
+ friend class RefCountedThreadSafe<HighPriorityTaskRunner>; |
+ |
+ virtual ~HighPriorityTaskRunner(); |
+ |
+ scoped_refptr<internal::IncomingTaskQueue> incoming_queue_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(HighPriorityTaskRunner); |
+}; |
+ |
+} // namespace base |
+ |
+#endif // BASE_MESSAGE_LOOP_HIGH_PRIORITY_TASK_RUNNER_H_ |