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

Unified Diff: base/message_loop/high_priority_task_runner.h

Issue 281073002: NOT FOR REVIEW: Adding prioritized incoming task queue to renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prioritize input events Created 6 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gypi ('k') | base/message_loop/high_priority_task_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « base/base.gypi ('k') | base/message_loop/high_priority_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698