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

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

Issue 2895673002: [scheduler] Add unthrottled-by-blockable task queue to fix touch latency regression. (Closed)
Patch Set: Created 3 years, 7 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 "platform/wtf/RefPtr.h" 8 #include "platform/wtf/RefPtr.h"
9 9
10 #include <memory> 10 #include <memory>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual RefPtr<WebTaskRunner> SuspendableTaskRunner() = 0; 59 virtual RefPtr<WebTaskRunner> SuspendableTaskRunner() = 0;
60 60
61 // Returns the WebTaskRunner for tasks which should never get throttled. 61 // Returns the WebTaskRunner for tasks which should never get throttled.
62 // This is generally used for executing internal browser tasks which should 62 // This is generally used for executing internal browser tasks which should
63 // never be throttled. Ideally only tasks whose performance characteristics 63 // never be throttled. Ideally only tasks whose performance characteristics
64 // 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
65 // JavaScript is discouraged. WebFrameScheduler owns the returned 65 // JavaScript is discouraged. WebFrameScheduler owns the returned
66 // WebTaskRunner. 66 // WebTaskRunner.
67 virtual RefPtr<WebTaskRunner> UnthrottledTaskRunner() = 0; 67 virtual RefPtr<WebTaskRunner> UnthrottledTaskRunner() = 0;
68 68
69 // Retuns the WebTaskRunner for tasks which should not be suspended or
70 // throttled, but should be blocked during user gesture.
71 // This is a temporary task runner needed for a fix for touch latency
72 // regression. All tasks from it should be moved to suspendable or
73 // unthrottled task runner.
74 virtual RefPtr<WebTaskRunner> GeneralTaskRunner() = 0;
75
69 // Returns the parent WebViewScheduler. 76 // Returns the parent WebViewScheduler.
70 virtual WebViewScheduler* GetWebViewScheduler() { return nullptr; } 77 virtual WebViewScheduler* GetWebViewScheduler() { return nullptr; }
71 78
72 // Tells the scheduler a resource load has started. The scheduler may make 79 // Tells the scheduler a resource load has started. The scheduler may make
73 // policy decisions based on this. 80 // policy decisions based on this.
74 virtual void DidStartLoading(unsigned long identifier) {} 81 virtual void DidStartLoading(unsigned long identifier) {}
75 82
76 // Tells the scheduler a resource load has stopped. The scheduler may make 83 // Tells the scheduler a resource load has stopped. The scheduler may make
77 // policy decisions based on this. 84 // policy decisions based on this.
78 virtual void DidStopLoading(unsigned long identifier) {} 85 virtual void DidStopLoading(unsigned long identifier) {}
(...skipping 11 matching lines...) Expand all
90 // connection (websocket, webrtc, etc). When connection is closed this handle 97 // connection (websocket, webrtc, etc). When connection is closed this handle
91 // must be destroyed. 98 // must be destroyed.
92 virtual std::unique_ptr<ActiveConnectionHandle> OnActiveConnectionCreated() { 99 virtual std::unique_ptr<ActiveConnectionHandle> OnActiveConnectionCreated() {
93 return nullptr; 100 return nullptr;
94 }; 101 };
95 }; 102 };
96 103
97 } // namespace blink 104 } // namespace blink
98 105
99 #endif // WebFrameScheduler_h 106 #endif // WebFrameScheduler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698