blob: 061f6ba4f2e954044460aa65a6d46a348909e59c [file] [log] [blame]
Jesse McKennab85e25b2018-11-27 21:37:021// Copyright 2018 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 BASE_UPDATEABLE_SEQUENCED_TASK_RUNNER_H_
6#define BASE_UPDATEABLE_SEQUENCED_TASK_RUNNER_H_
7
8#include "base/sequenced_task_runner.h"
9#include "base/task/task_traits.h"
10
11namespace base {
12
13// A SequencedTaskRunner whose posted tasks' priorities can be updated.
14class BASE_EXPORT UpdateableSequencedTaskRunner : public SequencedTaskRunner {
15 public:
16 // Updates the priority for tasks posted through this TaskRunner to
17 // |priority|.
18 virtual void UpdatePriority(TaskPriority priority) = 0;
19
20 protected:
21 UpdateableSequencedTaskRunner() = default;
22 ~UpdateableSequencedTaskRunner() override = default;
23
24 DISALLOW_COPY_AND_ASSIGN(UpdateableSequencedTaskRunner);
25};
26
27} // namespace base
28
29#endif // BASE_UPDATEABLE_SEQUENCED_TASK_RUNNER_H_