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

Side by Side Diff: third_party/WebKit/Source/platform/WebFrameScheduler.h

Issue 2754673002: [scheduler] Split suspendable tq from unthrottled tq. (Closed)
Patch Set: Unthrottled means unthrottled Created 3 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
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 WebFrameScheduler_h 5 #ifndef WebFrameScheduler_h
6 #define WebFrameScheduler_h 6 #define WebFrameScheduler_h
7 7
8 #include "wtf/RefPtr.h" 8 #include "wtf/RefPtr.h"
9 9
10 #include <memory> 10 #include <memory>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual void setCrossOrigin(bool) {} 44 virtual void setCrossOrigin(bool) {}
45 45
46 // Returns the WebTaskRunner for loading tasks. 46 // Returns the WebTaskRunner for loading tasks.
47 // WebFrameScheduler owns the returned WebTaskRunner. 47 // WebFrameScheduler owns the returned WebTaskRunner.
48 virtual RefPtr<WebTaskRunner> loadingTaskRunner() = 0; 48 virtual RefPtr<WebTaskRunner> loadingTaskRunner() = 0;
49 49
50 // Returns the WebTaskRunner for timer tasks. 50 // Returns the WebTaskRunner for timer tasks.
51 // WebFrameScheduler owns the returned WebTaskRunner. 51 // WebFrameScheduler owns the returned WebTaskRunner.
52 virtual RefPtr<WebTaskRunner> timerTaskRunner() = 0; 52 virtual RefPtr<WebTaskRunner> timerTaskRunner() = 0;
53 53
54 // Returns the WebTaskRunner for tasks which shouldn't get throttled,
55 // but can be suspended.
56 // TODO(altimin): This is transitional task runner. Unthrottled task runner
haraken 2017/03/22 23:48:34 a transitional task runner
57 // would become suspendable in the nearest future and a new unsuspended
58 // task runner will be added.
59 virtual RefPtr<WebTaskRunner> suspendableTaskRunner() = 0;
60
54 // Returns the WebTaskRunner for tasks which should never get throttled. 61 // Returns the WebTaskRunner for tasks which should never get throttled.
55 // This is generally used for executing internal browser tasks which should 62 // This is generally used for executing internal browser tasks which should
56 // never be throttled. Ideally only tasks whose performance characteristics 63 // never be throttled. Ideally only tasks whose performance characteristics
57 // are known should be posted to this task runner; for example user 64 // are known should be posted to this task runner; for example user
58 // JavaScript is discouraged. WebFrameScheduler owns the returned 65 // JavaScript is discouraged. WebFrameScheduler owns the returned
59 // WebTaskRunner. 66 // WebTaskRunner.
60 virtual RefPtr<WebTaskRunner> unthrottledTaskRunner() = 0; 67 virtual RefPtr<WebTaskRunner> unthrottledTaskRunner() = 0;
61 68
62 // Returns the parent WebViewScheduler. 69 // Returns the parent WebViewScheduler.
63 virtual WebViewScheduler* webViewScheduler() { return nullptr; } 70 virtual WebViewScheduler* webViewScheduler() { return nullptr; }
(...skipping 19 matching lines...) Expand all
83 // connection (websocket, webrtc, etc). When connection is closed this handle 90 // connection (websocket, webrtc, etc). When connection is closed this handle
84 // must be destroyed. 91 // must be destroyed.
85 virtual std::unique_ptr<ActiveConnectionHandle> onActiveConnectionCreated() { 92 virtual std::unique_ptr<ActiveConnectionHandle> onActiveConnectionCreated() {
86 return nullptr; 93 return nullptr;
87 }; 94 };
88 }; 95 };
89 96
90 } // namespace blink 97 } // namespace blink
91 98
92 #endif // WebFrameScheduler_h 99 #endif // WebFrameScheduler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698