• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 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_TASK_SCHEDULER_CAN_SCHEDULE_SEQUENCE_OBSERVER_H_
6 #define BASE_TASK_SCHEDULER_CAN_SCHEDULE_SEQUENCE_OBSERVER_H_
7 
8 #include "base/task_scheduler/sequence.h"
9 
10 namespace base {
11 namespace internal {
12 
13 class CanScheduleSequenceObserver {
14  public:
15   // Called when |sequence| can be scheduled. It is expected that
16   // TaskTracker::RunNextTask() will be called with |sequence| as argument after
17   // this is called.
18   virtual void OnCanScheduleSequence(scoped_refptr<Sequence> sequence) = 0;
19 
20  protected:
21   virtual ~CanScheduleSequenceObserver() = default;
22 };
23 
24 }  // namespace internal
25 }  // namespace base
26 
27 #endif  // BASE_TASK_SCHEDULER_CAN_SCHEDULE_SEQUENCE_OBSERVER_H_
28