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

Side by Side Diff: third_party/WebKit/public/platform/WebScheduler.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another GYP fix Created 4 years, 5 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 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 WebScheduler_h 5 #ifndef WebScheduler_h
6 #define WebScheduler_h 6 #define WebScheduler_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "public/platform/WebTaskRunner.h" 9 #include "public/platform/WebTaskRunner.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
11 #include "public/platform/WebViewScheduler.h" 11 #include "public/platform/WebViewScheduler.h"
12 12
13 #include <memory> 13 #include <memory>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class WebTraceLocation; 17 class WebTraceLocation;
18 class WebView; 18 class WebView;
19 19
20 // This class is used to submit tasks and pass other information from Blink to 20 // This class is used to submit tasks and pass other information from Blink to
21 // the platform's scheduler. 21 // the platform's scheduler.
22 // TODO(skyostil): Replace this class with RendererScheduler.
22 class BLINK_PLATFORM_EXPORT WebScheduler { 23 class BLINK_PLATFORM_EXPORT WebScheduler {
23 public: 24 public:
24 virtual ~WebScheduler() { } 25 virtual ~WebScheduler() { }
25 26
26 // Called to prevent any more pending tasks from running. Must be called on 27 // Called to prevent any more pending tasks from running. Must be called on
27 // the associated WebThread. 28 // the associated WebThread.
28 virtual void shutdown() = 0; 29 virtual void shutdown() = 0;
29 30
30 // Returns true if there is high priority work pending on the associated Web Thread 31 // Returns true if there is high priority work pending on the associated Web Thread
31 // and the caller should yield to let the scheduler service that work. 32 // and the caller should yield to let the scheduler service that work.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 void postIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>); 102 void postIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>);
102 void postNonNestableIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTa sk>); 103 void postNonNestableIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTa sk>);
103 void postIdleTaskAfterWakeup(const WebTraceLocation&, std::unique_ptr<IdleTa sk>); 104 void postIdleTaskAfterWakeup(const WebTraceLocation&, std::unique_ptr<IdleTa sk>);
104 #endif 105 #endif
105 }; 106 };
106 107
107 } // namespace blink 108 } // namespace blink
108 109
109 #endif // WebScheduler_h 110 #endif // WebScheduler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698