OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_RENDERER_MESSAGE_LOOP_H_ |
| 6 #define CONTENT_RENDERER_RENDERER_MESSAGE_LOOP_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/pending_task.h" |
| 12 |
| 13 namespace base { |
| 14 class HighPriorityTaskRunner; |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class RendererMessageLoop : public base::MessageLoop { |
| 20 public: |
| 21 RendererMessageLoop(); |
| 22 explicit RendererMessageLoop(scoped_ptr<base::MessagePump> pump); |
| 23 virtual ~RendererMessageLoop(); |
| 24 |
| 25 void EnableHighPriorityIncomingTaskQueue(); |
| 26 |
| 27 protected: |
| 28 virtual void ReloadWorkQueue() OVERRIDE; |
| 29 virtual base::TaskQueue& SelectNextWorkQueue() OVERRIDE; |
| 30 |
| 31 private: |
| 32 base::TaskQueue high_priority_work_queue_; |
| 33 scoped_refptr<base::HighPriorityTaskRunner> high_priority_task_runner_; |
| 34 |
| 35 int normal_work_queue_deficit_; |
| 36 }; |
| 37 |
| 38 } // namespace content |
| 39 |
| 40 #endif // CONTENT_RENDERER_RENDERER_MESSAGE_LOOP_H_ |
OLD | NEW |