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

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

Issue 2885313003: [scheduler] Fix --disable-background-timer-throttling flag. (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 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H_
7 7
8 #include "platform/scheduler/renderer/web_view_scheduler.h" 8 #include "platform/scheduler/renderer/web_view_scheduler.h"
9 #include "public/platform/WebString.h" 9 #include "public/platform/WebString.h"
10 #include "public/platform/WebThread.h" 10 #include "public/platform/WebThread.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Tells the scheduler that a navigation task is pending. 89 // Tells the scheduler that a navigation task is pending.
90 // TODO(alexclarke): Long term should this be a task trait? 90 // TODO(alexclarke): Long term should this be a task trait?
91 virtual void AddPendingNavigation( 91 virtual void AddPendingNavigation(
92 scheduler::RendererScheduler::NavigatingFrameType) = 0; 92 scheduler::RendererScheduler::NavigatingFrameType) = 0;
93 93
94 // Tells the scheduler that a navigation task is no longer pending. 94 // Tells the scheduler that a navigation task is no longer pending.
95 virtual void RemovePendingNavigation( 95 virtual void RemovePendingNavigation(
96 scheduler::RendererScheduler::NavigatingFrameType) = 0; 96 scheduler::RendererScheduler::NavigatingFrameType) = 0;
97 97
98 // Test helpers.
99
100 // Return a reference to an underlying RendererScheduler object.
101 // Can be null if there is no underlying RendererScheduler
102 // (e.g. worker threads).
103 virtual scheduler::RendererScheduler* GetRendererSchedulerForTest() {
104 return nullptr;
105 }
106
98 #ifdef INSIDE_BLINK 107 #ifdef INSIDE_BLINK
99 // Helpers for posting bound functions as tasks. 108 // Helpers for posting bound functions as tasks.
100 typedef Function<void(double deadline_seconds)> IdleTask; 109 typedef Function<void(double deadline_seconds)> IdleTask;
101 110
102 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>); 111 void PostIdleTask(const WebTraceLocation&, std::unique_ptr<IdleTask>);
103 void PostNonNestableIdleTask(const WebTraceLocation&, 112 void PostNonNestableIdleTask(const WebTraceLocation&,
104 std::unique_ptr<IdleTask>); 113 std::unique_ptr<IdleTask>);
105 #endif 114 #endif
106 }; 115 };
107 116
108 } // namespace blink 117 } // namespace blink
109 118
110 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H _ 119 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_WEB_SCHEDULER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698