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

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

Issue 664963002: content: Add RendererScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 6 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_
6 #define CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h"
10 #include "third_party/WebKit/public/platform/WebScheduler.h"
11
12 namespace content {
13
14 class RendererScheduler;
15 class SingleThreadIdleTaskRunner;
16
17 class WebSchedulerImpl : public blink::WebScheduler {
18 public:
19 WebSchedulerImpl(RendererScheduler* renderer_scheduler);
20 ~WebSchedulerImpl() override;
21
22 virtual bool shouldYieldForHighPriorityWork();
no sievers 2014/10/30 23:40:51 'override' or 'final' for these methods
rmcilroy 2014/11/03 19:02:53 I had this originally however Sami commented that
23 virtual void postIdleTask(const blink::WebTraceLocation& location,
24 blink::WebScheduler::IdleTask* task);
25 virtual void shutdown();
26
27 private:
28 static void runIdleTask(blink::WebScheduler::IdleTask* task,
29 base::TimeTicks deadline);
30
31 RendererScheduler* renderer_scheduler_;
32 scoped_refptr<SingleThreadIdleTaskRunner> idle_task_runner_;
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_RENDERER_SCHEDULER_WEB_SCHEDULER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698