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

Side by Side Diff: third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h

Issue 2442663002: Add ResumeRenderer to RendererScheduler for Purge+Suspend. (Closed)
Patch Set: Fixed comment. Created 4 years, 1 month 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_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_
6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Tells the scheduler that the renderer process has been foregrounded. 127 // Tells the scheduler that the renderer process has been foregrounded.
128 // This is the assumed state when the scheduler is constructed. 128 // This is the assumed state when the scheduler is constructed.
129 // Must be called on the main thread. 129 // Must be called on the main thread.
130 virtual void OnRendererForegrounded() = 0; 130 virtual void OnRendererForegrounded() = 0;
131 131
132 // Tells the scheduler that the render process should be suspended. This can 132 // Tells the scheduler that the render process should be suspended. This can
133 // only be done when the renderer is backgrounded. The renderer will be 133 // only be done when the renderer is backgrounded. The renderer will be
134 // automatically resumed when foregrounded. 134 // automatically resumed when foregrounded.
135 virtual void SuspendRenderer() = 0; 135 virtual void SuspendRenderer() = 0;
136 136
137 // Tells the scheduler that the render process should be resumed. This can
138 // only be done when the renderer is suspended. TabManager (in the future,
139 // MemoryCoordinator) will suspend the renderer again if continuously
140 // backgrounded.
141 virtual void ResumeRenderer() = 0;
142
137 // Tells the scheduler that a navigation task is pending. While any main-frame 143 // Tells the scheduler that a navigation task is pending. While any main-frame
138 // navigation tasks are pending, the scheduler will ensure that loading tasks 144 // navigation tasks are pending, the scheduler will ensure that loading tasks
139 // are not blocked even if they are expensive. Must be called on the main 145 // are not blocked even if they are expensive. Must be called on the main
140 // thread. 146 // thread.
141 virtual void AddPendingNavigation(WebScheduler::NavigatingFrameType type) = 0; 147 virtual void AddPendingNavigation(WebScheduler::NavigatingFrameType type) = 0;
142 148
143 // Tells the scheduler that a navigation task is no longer pending. 149 // Tells the scheduler that a navigation task is no longer pending.
144 // Must be called on the main thread. 150 // Must be called on the main thread.
145 virtual void RemovePendingNavigation( 151 virtual void RemovePendingNavigation(
146 WebScheduler::NavigatingFrameType type) = 0; 152 WebScheduler::NavigatingFrameType type) = 0;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 188
183 protected: 189 protected:
184 RendererScheduler(); 190 RendererScheduler();
185 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 191 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
186 }; 192 };
187 193
188 } // namespace scheduler 194 } // namespace scheduler
189 } // namespace blink 195 } // namespace blink
190 196
191 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ 197 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698