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

Side by Side Diff: content/renderer/scheduler/web_scheduler_impl.h

Issue 936853002: [renderer] Add support for postIdleTaskAfterWakeup to WebSchedulerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@long_idle_2
Patch Set: Rebase Created 5 years, 9 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 | content/renderer/scheduler/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_
6 #define CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ 6 #define CONTENT_RENDERER_SCHEDULER_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 11 matching lines...) Expand all
22 class SingleThreadIdleTaskRunner; 22 class SingleThreadIdleTaskRunner;
23 23
24 class CONTENT_EXPORT WebSchedulerImpl : public blink::WebScheduler { 24 class CONTENT_EXPORT WebSchedulerImpl : public blink::WebScheduler {
25 public: 25 public:
26 WebSchedulerImpl(RendererScheduler* renderer_scheduler); 26 WebSchedulerImpl(RendererScheduler* renderer_scheduler);
27 ~WebSchedulerImpl() override; 27 ~WebSchedulerImpl() override;
28 28
29 virtual bool shouldYieldForHighPriorityWork(); 29 virtual bool shouldYieldForHighPriorityWork();
30 virtual void postIdleTask(const blink::WebTraceLocation& location, 30 virtual void postIdleTask(const blink::WebTraceLocation& location,
31 blink::WebScheduler::IdleTask* task); 31 blink::WebScheduler::IdleTask* task);
32 virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location,
33 blink::WebScheduler::IdleTask* task);
32 virtual void postLoadingTask(const blink::WebTraceLocation& location, 34 virtual void postLoadingTask(const blink::WebTraceLocation& location,
33 blink::WebThread::Task* task); 35 blink::WebThread::Task* task);
34 virtual void shutdown(); 36 virtual void shutdown();
35 37
36 private: 38 private:
37 static void runIdleTask(scoped_ptr<blink::WebScheduler::IdleTask> task, 39 static void runIdleTask(scoped_ptr<blink::WebScheduler::IdleTask> task,
38 base::TimeTicks deadline); 40 base::TimeTicks deadline);
39 static void runTask(scoped_ptr<blink::WebThread::Task> task); 41 static void runTask(scoped_ptr<blink::WebThread::Task> task);
40 42
41 RendererScheduler* renderer_scheduler_; 43 RendererScheduler* renderer_scheduler_;
42 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_; 44 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
43 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_; 45 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
44 }; 46 };
45 47
46 } // namespace content 48 } // namespace content
47 49
48 #endif // CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_ 50 #endif // CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/scheduler/web_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698