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

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

Issue 2109843003: Adds enableVirtualTime and setVirtualTimePolicy To Emulation domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove frame iteration 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
« no previous file with comments | « third_party/WebKit/public/platform/WebFrameScheduler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WebViewScheduler_h 5 #ifndef WebViewScheduler_h
6 #define WebViewScheduler_h 6 #define WebViewScheduler_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "public/platform/BlameContext.h" 9 #include "public/platform/BlameContext.h"
10 10
(...skipping 19 matching lines...) Expand all
30 // the system doesn't actually sleep for the delays between tasks before exe cuting 30 // the system doesn't actually sleep for the delays between tasks before exe cuting
31 // them. E.g: A-E are delayed tasks 31 // them. E.g: A-E are delayed tasks
32 // 32 //
33 // | A B C D E (normal) 33 // | A B C D E (normal)
34 // |-----------------------------> time 34 // |-----------------------------> time
35 // 35 //
36 // |ABCDE (virtual time) 36 // |ABCDE (virtual time)
37 // |-----------------------------> time 37 // |-----------------------------> time
38 virtual void enableVirtualTime() = 0; 38 virtual void enableVirtualTime() = 0;
39 39
40 // Controls whether or not virtual time is allowed to advance. If virtual ti me 40 // Returns true if virtual time is currently allowed to advance.
41 // is not allowed to advance then delayed tasks posted to the WebTaskRunners owned 41 virtual bool virtualTimeAllowedToAdvance() const = 0;
42 // by any child WebFrameSchedulers will be paused. If virtual time is allowe d to 42
43 // advance then tasks will be run in time order (as usual) but virtual time will 43 enum class VirtualTimePolicy {
44 // fast forward so that the system doesn't actually sleep for the delays bet ween 44 // In this policy virtual time is allowed to advance. If the blink sched uler runs out of
45 // tasks before executing them. 45 // immediate work, the virtual timebase will be incremented so that the next sceduled
46 virtual void setAllowVirtualTimeToAdvance(bool) = 0; 46 // timer may fire. NOTE Tasks will be run in time order (as usual).
47 ADVANCE,
48
49 // In this policy virtual time is not allowed to advance. Delayed tasks posted to
50 // WebTaskRunners owned by any child WebFrameSchedulers will be paused, unless their
51 // scheduled run time is less than or equal to the current virtual time. Note non-delayed
52 // tasks will run as normal.
53 PAUSE,
54
55 // In this policy virtual time is allowed to advance unless there are pe nding network
56 // fetches associated any child WebFrameScheduler.
57 PAUSE_IF_NETWORK_FETCHES_PENDING
58 };
59
60 // Sets the virtual time policy, which is applied imemdiatly to all child We bFrameSchedulers.
61 virtual void setVirtualTimePolicy(VirtualTimePolicy) = 0;
47 }; 62 };
48 63
49 } // namespace blink 64 } // namespace blink
50 65
51 #endif // WebViewScheduler 66 #endif // WebViewScheduler
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebFrameScheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698