Allow only one bookmark to be added for multiple fast starring
[chromium-blink-merge.git] / components / scheduler / child / null_task_queue.h
blobac5734349fa653356cc5905c49afe5b5504d0393
1 // Copyright 2015 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.
5 #ifndef COMPONENTS_SCHEDULER_NULL_CHILD_TASK_QUEUE_H_
6 #define COMPONENTS_SCHEDULER_NULL_CHILD_TASK_QUEUE_H_
8 #include "components/scheduler/child/task_queue.h"
9 #include "components/scheduler/scheduler_export.h"
11 namespace scheduler {
13 class SCHEDULER_EXPORT NullTaskQueue : public TaskQueue {
14 public:
15 NullTaskQueue(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
17 // TaskQueue implementation
18 bool RunsTasksOnCurrentThread() const override;
19 bool PostDelayedTask(const tracked_objects::Location& from_here,
20 const base::Closure& task,
21 base::TimeDelta delay) override;
22 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
23 const base::Closure& task,
24 base::TimeDelta delay) override;
25 bool PostDelayedTaskAt(const tracked_objects::Location& from_here,
26 const base::Closure& task,
27 base::TimeTicks desired_run_time) override;
29 bool IsQueueEnabled() const override;
30 QueueState GetQueueState() const override;
31 const char* GetName() const override;
32 void SetQueuePriority(QueuePriority priority) override;
33 void PumpQueue() override;
34 void SetPumpPolicy(PumpPolicy pump_policy) override;
36 protected:
37 ~NullTaskQueue() override;
39 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
41 DISALLOW_COPY_AND_ASSIGN(NullTaskQueue);
44 } // namespace scheduler
46 #endif // COMPONENTS_SCHEDULER_CHILD_NULL_TASK_QUEUE_H_