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

Side by Side Diff: components/scheduler/child/scheduler_message_loop_delegate.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_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ 5 #ifndef COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_
6 #define CONTENT_CHILD_SCHEDULER_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ 6 #define COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/child/scheduler/nestable_single_thread_task_runner.h" 9 #include "components/scheduler/child/nestable_single_thread_task_runner.h"
10 #include "content/common/content_export.h" 10 #include "components/scheduler/scheduler_export.h"
11 11
12 namespace content { 12 namespace scheduler {
13 13
14 class CONTENT_EXPORT SchedulerMessageLoopDelegate 14 class SCHEDULER_EXPORT SchedulerMessageLoopDelegate
15 : public NestableSingleThreadTaskRunner { 15 : public NestableSingleThreadTaskRunner {
16 public: 16 public:
17 // |message_loop| is not owned and must outlive the lifetime of this object. 17 // |message_loop| is not owned and must outlive the lifetime of this object.
18 static scoped_refptr<SchedulerMessageLoopDelegate> Create( 18 static scoped_refptr<SchedulerMessageLoopDelegate> Create(
19 base::MessageLoop* message_loop); 19 base::MessageLoop* message_loop);
20 20
21 // NestableSingleThreadTaskRunner implementation 21 // NestableSingleThreadTaskRunner implementation
22 bool PostDelayedTask(const tracked_objects::Location& from_here, 22 bool PostDelayedTask(const tracked_objects::Location& from_here,
23 const base::Closure& task, 23 const base::Closure& task,
24 base::TimeDelta delay) override; 24 base::TimeDelta delay) override;
25 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 25 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
26 const base::Closure& task, 26 const base::Closure& task,
27 base::TimeDelta delay) override; 27 base::TimeDelta delay) override;
28 bool RunsTasksOnCurrentThread() const override; 28 bool RunsTasksOnCurrentThread() const override;
29 bool IsNested() const override; 29 bool IsNested() const override;
30 30
31 protected: 31 protected:
32 ~SchedulerMessageLoopDelegate() override; 32 ~SchedulerMessageLoopDelegate() override;
33 33
34 private: 34 private:
35 SchedulerMessageLoopDelegate(base::MessageLoop* message_loop); 35 SchedulerMessageLoopDelegate(base::MessageLoop* message_loop);
36 36
37 // Not owned. 37 // Not owned.
38 base::MessageLoop* message_loop_; 38 base::MessageLoop* message_loop_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(SchedulerMessageLoopDelegate); 40 DISALLOW_COPY_AND_ASSIGN(SchedulerMessageLoopDelegate);
41 }; 41 };
42 42
43 } // namespace content 43 } // namespace scheduler
44 44
45 #endif // CONTENT_CHILD_SCHEDULER_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_ 45 #endif // COMPONENTS_SCHEDULER_CHILD_SCHEDULER_MESSAGE_LOOP_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/scheduler/child/scheduler_helper_unittest.cc ('k') | components/scheduler/child/scheduler_message_loop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698