Index: content/renderer/renderer_high_priority_task_queue.h |
diff --git a/content/renderer/renderer_high_priority_task_queue.h b/content/renderer/renderer_high_priority_task_queue.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c52c3fa10f5f45c963436c74793ae6dc980282d9 |
--- /dev/null |
+++ b/content/renderer/renderer_high_priority_task_queue.h |
@@ -0,0 +1,62 @@ |
+// Copyright (c) 2012 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 CHROME_RENDERER_RENDERER_HIGH_PRIORITY_TASK_QUEUE_H_ |
+#define CHROME_RENDERER_RENDERER_HIGH_PRIORITY_TASK_QUEUE_H_ |
+ |
+#include "base/base_export.h" |
+#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/message_loop/incoming_task_queue.h" |
+#include "base/message_loop/message_loop.h" |
+#include "base/message_loop/message_pump_default.h" |
+#include "base/time/time.h" |
+ |
+namespace tracked_objects { |
+class Location; |
+} // namespace tracked_objects |
+ |
+namespace content { |
+ |
+class MessagePumpHighPriority : public base::MessagePumpDefault { |
+ public: |
+ MessagePumpHighPriority(); |
+ virtual ~MessagePumpHighPriority(); |
+ |
+ private: |
+ |
+}; |
+ |
+class MessageLoopRendererMainThread : public base::MessageLoop { |
+ public: |
+ MessageLoopRendererMainThread(); |
+ |
+ virtual void ReloadAllWorkQueues() OVERRIDE; |
+ virtual base::TaskQueue& GetNextWorkQueue() OVERRIDE; |
+ virtual bool HasWorkAvailable() const OVERRIDE; |
+ |
+ private: |
+ void ReloadHighPriorityWorkQueue(); |
+ |
+ scoped_refptr<base::internal::IncomingTaskQueue> |
+ high_priority_incoming_task_queue_; |
+ scoped_refptr<base::internal::MessageLoopProxyImpl> |
+ high_priority_message_loop_proxy_; |
+ base::TaskQueue high_priority_work_queue_; |
+}; |
+ |
+class RendererHighPriorityTaskQueue { |
+ public: |
+ static bool PostTask(const tracked_objects::Location& from_here, |
+ const base::Closure& task); |
+ private: |
+ RendererHighPriorityTaskQueue() {} |
+ DISALLOW_COPY_AND_ASSIGN(RendererHighPriorityTaskQueue); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CHROME_RENDERER_RENDERER_MAIN_PLATFORM_DELEGATE_H_ |