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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler.h

Issue 2841463003: scheduler: Make virtual time expiration deterministic (Closed)
Patch Set: Rebased 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER _H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER _H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER _H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDULER _H_
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/wtf/Functional.h" 9 #include "platform/wtf/Functional.h"
10 #include "public/platform/BlameContext.h" 10 #include "public/platform/BlameContext.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // document is being parsed on a background thread. Initially virtual time 76 // document is being parsed on a background thread. Initially virtual time
77 // is not allowed to advance until we have seen at least one load. The aim 77 // is not allowed to advance until we have seen at least one load. The aim
78 // being to try and make loading (more) deterministic. 78 // being to try and make loading (more) deterministic.
79 DETERMINISTIC_LOADING 79 DETERMINISTIC_LOADING
80 }; 80 };
81 81
82 // Sets the virtual time policy, which is applied imemdiatly to all child 82 // Sets the virtual time policy, which is applied imemdiatly to all child
83 // WebFrameSchedulers. 83 // WebFrameSchedulers.
84 virtual void SetVirtualTimePolicy(VirtualTimePolicy) = 0; 84 virtual void SetVirtualTimePolicy(VirtualTimePolicy) = 0;
85 85
86 // Set the remaining virtual time budget to |budget|. Once the budget runs
87 // out, |budget_exhausted_callback| is called. Note that the virtual time
88 // policy is not affected when the budget expires.
89 virtual void GrantVirtualTimeBudget(
90 base::TimeDelta budget,
91 std::unique_ptr<WTF::Closure> budget_exhausted_callback) = 0;
92
86 virtual void AudioStateChanged(bool is_audio_playing) = 0; 93 virtual void AudioStateChanged(bool is_audio_playing) = 0;
87 94
88 virtual bool HasActiveConnectionForTest() const = 0; 95 virtual bool HasActiveConnectionForTest() const = 0;
89 }; 96 };
90 97
91 } // namespace blink 98 } // namespace blink
92 99
93 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDU LER_H_ 100 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_VIEW_SCHEDU LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698