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

Side by Side Diff: base/message_loop/high_priority_task_runner.cc

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 unified diff | Download patch
« no previous file with comments | « base/message_loop/high_priority_task_runner.h ('k') | base/message_loop/message_loop.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "base/message_loop/high_priority_task_runner.h"
6
7 #include "base/logging.h"
8 #include "base/message_loop/incoming_task_queue.h"
9 #include "base/pending_task.h"
10
11 namespace base {
12
13 HighPriorityTaskRunner::HighPriorityTaskRunner(MessageLoop* message_loop)
14 : incoming_queue_(new internal::IncomingTaskQueue(message_loop)) {
15 DCHECK(message_loop);
16 }
17
18 HighPriorityTaskRunner::~HighPriorityTaskRunner() {
19 }
20
21 void HighPriorityTaskRunner::PostTask(
22 const tracked_objects::Location& from_here,
23 const Closure& task) {
24 incoming_queue_->AddToIncomingQueue(
25 from_here, task, TimeDelta(), false);
26 }
27
28 void HighPriorityTaskRunner::ReloadWorkQueue(TaskQueue* target_work_queue) {
29 DCHECK(target_work_queue && target_work_queue->empty());
30 incoming_queue_->ReloadWorkQueue(target_work_queue);
31 }
32
33 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/high_priority_task_runner.h ('k') | base/message_loop/message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698