| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |