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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/web_scheduler.h

Issue 2843503002: scheduler: Move WebFrameScheduler and WebScheduler into Blink (Closed)
Patch Set: Build fix Created 3 years, 8 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_
6 #define WebScheduler_h 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_
7 7
8 #include "WebCommon.h" 8 #include "platform/scheduler/renderer/web_view_scheduler.h"
9 #include "WebString.h" 9 #include "public/platform/WebString.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
11 #include "public/platform/WebTraceLocation.h" 11 #include "public/platform/WebTraceLocation.h"
12 #include "public/platform/WebViewScheduler.h" 12 #include "public/platform/scheduler/renderer/renderer_scheduler.h"
13 13
14 #include <memory> 14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class WebTaskRunner; 18 class WebTaskRunner;
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 // TODO(skyostil): Replace this class with RendererScheduler.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 WebViewScheduler::WebViewSchedulerSettings*) = 0; 79 WebViewScheduler::WebViewSchedulerSettings*) = 0;
80 80
81 // Suspends the timer queue and increments the timer queue suspension count. 81 // Suspends the timer queue and increments the timer queue suspension count.
82 // May only be called from the main thread. 82 // May only be called from the main thread.
83 virtual void SuspendTimerQueue() = 0; 83 virtual void SuspendTimerQueue() = 0;
84 84
85 // Decrements the timer queue suspension count and re-enables the timer queue 85 // Decrements the timer queue suspension count and re-enables the timer queue
86 // if the suspension count is zero and the current scheduler policy allows it. 86 // if the suspension count is zero and the current scheduler policy allows it.
87 virtual void ResumeTimerQueue() = 0; 87 virtual void ResumeTimerQueue() = 0;
88 88
89 enum class NavigatingFrameType { kMainFrame, kChildFrame };
90
91 // Tells the scheduler that a navigation task is pending. 89 // Tells the scheduler that a navigation task is pending.
92 // TODO(alexclarke): Long term should this be a task trait? 90 // TODO(alexclarke): Long term should this be a task trait?
93 virtual void AddPendingNavigation(NavigatingFrameType) = 0; 91 virtual void AddPendingNavigation(
92 scheduler::RendererScheduler::NavigatingFrameType) = 0;
94 93
95 // Tells the scheduler that a navigation task is no longer pending. 94 // Tells the scheduler that a navigation task is no longer pending.
96 virtual void RemovePendingNavigation(NavigatingFrameType) = 0; 95 virtual void RemovePendingNavigation(
96 scheduler::RendererScheduler::NavigatingFrameType) = 0;
97 97
98 #ifdef INSIDE_BLINK 98 #ifdef INSIDE_BLINK
99 // Helpers for posting bound functions as tasks. 99 // Helpers for posting bound functions as tasks.
100 typedef Function<void(double deadline_seconds)> IdleTask; 100 typedef Function<void(double deadline_seconds)> IdleTask;
101 101
102 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>); 102 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>);
103 void PostNonNestableIdleTask(const WebTraceLocation&, 103 void PostNonNestableIdleTask(const WebTraceLocation&,
104 std::unique_ptr<IdleTask>); 104 std::unique_ptr<IdleTask>);
105 #endif 105 #endif
106 }; 106 };
107 107
108 } // namespace blink 108 } // namespace blink
109 109
110 #endif // WebScheduler_h 110 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698