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

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

Issue 1256823007: Chromium support for WebScheduler::postTimerTask with high precision (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | components/scheduler/child/web_scheduler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BASE_WEB_SCHEDULER_IMPL_H_ 5 #ifndef CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
6 #define CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_ 6 #define CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 25 matching lines...) Expand all
36 virtual bool shouldYieldForHighPriorityWork(); 36 virtual bool shouldYieldForHighPriorityWork();
37 virtual bool canExceedIdleDeadlineIfRequired(); 37 virtual bool canExceedIdleDeadlineIfRequired();
38 virtual void postIdleTask(const blink::WebTraceLocation& location, 38 virtual void postIdleTask(const blink::WebTraceLocation& location,
39 blink::WebThread::IdleTask* task); 39 blink::WebThread::IdleTask* task);
40 virtual void postNonNestableIdleTask(const blink::WebTraceLocation& location, 40 virtual void postNonNestableIdleTask(const blink::WebTraceLocation& location,
41 blink::WebThread::IdleTask* task); 41 blink::WebThread::IdleTask* task);
42 virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location, 42 virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location,
43 blink::WebThread::IdleTask* task); 43 blink::WebThread::IdleTask* task);
44 virtual void postLoadingTask(const blink::WebTraceLocation& location, 44 virtual void postLoadingTask(const blink::WebTraceLocation& location,
45 blink::WebThread::Task* task); 45 blink::WebThread::Task* task);
46 // TODO(alexclarke): Remove when possible.
46 virtual void postTimerTaskAt(const blink::WebTraceLocation& location, 47 virtual void postTimerTaskAt(const blink::WebTraceLocation& location,
47 blink::WebThread::Task* task, 48 blink::WebThread::Task* task,
48 double monotonicTime); 49 double monotonicTime);
49 50 virtual void postTimerTask(const blink::WebTraceLocation& location,
50 // TODO(skyostil): Remove once the Blink side patch lands. 51 blink::WebThread::Task* task,
52 double delaySecs);
53 // TODO(alexclarke): Remove once the Blink side patch lands.
51 virtual void postTimerTask(const blink::WebTraceLocation& location, 54 virtual void postTimerTask(const blink::WebTraceLocation& location,
52 blink::WebThread::Task* task, 55 blink::WebThread::Task* task,
53 long long delayMs); 56 long long delayMs);
54 57
55 private: 58 private:
56 static void runIdleTask(scoped_ptr<blink::WebThread::IdleTask> task, 59 static void runIdleTask(scoped_ptr<blink::WebThread::IdleTask> task,
57 base::TimeTicks deadline); 60 base::TimeTicks deadline);
58 static void runTask(scoped_ptr<blink::WebThread::Task> task); 61 static void runTask(scoped_ptr<blink::WebThread::Task> task);
59 62
60 ChildScheduler* child_scheduler_; // NOT OWNED 63 ChildScheduler* child_scheduler_; // NOT OWNED
61 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_; 64 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
62 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_; 65 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
63 scoped_refptr<TaskQueue> timer_task_runner_; 66 scoped_refptr<TaskQueue> timer_task_runner_;
64 }; 67 };
65 68
66 } // namespace scheduler 69 } // namespace scheduler
67 70
68 #endif // CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_ 71 #endif // CONTENT_CHILD_SCHEDULER_BASE_WEB_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/scheduler/child/web_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698