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

Side by Side Diff: components/scheduler/child/child_scheduler.h

Issue 1058873010: Move blink scheduler implementation into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_SCHEDULER_CHILD_SCHEDULER_H_ 5 #ifndef COMPONENTS_SCHEDULER_CHILD_CHILD_SCHEDULER_H_
6 #define CONTENT_CHILD_SCHEDULER_CHILD_SCHEDULER_H_ 6 #define COMPONENTS_SCHEDULER_CHILD_CHILD_SCHEDULER_H_
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/child/scheduler/single_thread_idle_task_runner.h" 9 #include "components/scheduler/child/single_thread_idle_task_runner.h"
10 #include "content/common/content_export.h" 10 #include "components/scheduler/scheduler_export.h"
11 11
12 namespace base { 12 namespace base {
13 class MessageLoop; 13 class MessageLoop;
14 } 14 }
15 15
16 namespace content { 16 namespace scheduler {
17 17
18 class CONTENT_EXPORT ChildScheduler { 18 class SCHEDULER_EXPORT ChildScheduler {
19 public: 19 public:
20 virtual ~ChildScheduler() { } 20 virtual ~ChildScheduler() {}
21 21
22 // Returns the default task runner. 22 // Returns the default task runner.
23 virtual scoped_refptr<base::SingleThreadTaskRunner> DefaultTaskRunner() = 0; 23 virtual scoped_refptr<base::SingleThreadTaskRunner> DefaultTaskRunner() = 0;
24 24
25 // Returns the idle task runner. Tasks posted to this runner may be reordered 25 // Returns the idle task runner. Tasks posted to this runner may be reordered
26 // relative to other task types and may be starved for an arbitrarily long 26 // relative to other task types and may be starved for an arbitrarily long
27 // time if no idle time is available. 27 // time if no idle time is available.
28 virtual scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() = 0; 28 virtual scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() = 0;
29 29
30 // Returns true if there is high priority work pending on the main thread 30 // Returns true if there is high priority work pending on the main thread
(...skipping 20 matching lines...) Expand all
51 base::MessageLoop::TaskObserver* task_observer) = 0; 51 base::MessageLoop::TaskObserver* task_observer) = 0;
52 virtual void RemoveTaskObserver( 52 virtual void RemoveTaskObserver(
53 base::MessageLoop::TaskObserver* task_observer) = 0; 53 base::MessageLoop::TaskObserver* task_observer) = 0;
54 54
55 // Shuts down the scheduler by dropping any remaining pending work in the work 55 // Shuts down the scheduler by dropping any remaining pending work in the work
56 // queues. After this call any work posted to the task runners will be 56 // queues. After this call any work posted to the task runners will be
57 // silently dropped. 57 // silently dropped.
58 virtual void Shutdown() = 0; 58 virtual void Shutdown() = 0;
59 59
60 protected: 60 protected:
61 ChildScheduler() { } 61 ChildScheduler() {}
62 DISALLOW_COPY_AND_ASSIGN(ChildScheduler); 62 DISALLOW_COPY_AND_ASSIGN(ChildScheduler);
63 }; 63 };
64 64
65 } // namespace content 65 } // namespace scheduler
66 66
67 #endif // CONTENT_CHILD_SCHEDULER_CHILD_SCHEDULER_H_ 67 #endif // COMPONENTS_SCHEDULER_CHILD_CHILD_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698