Chromium Code Reviews| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 // Tells the scheduler that the renderer process has been foregrounded. | 125 // Tells the scheduler that the renderer process has been foregrounded. |
| 126 // This is the assumed state when the scheduler is constructed. | 126 // This is the assumed state when the scheduler is constructed. |
| 127 // Must be called on the main thread. | 127 // Must be called on the main thread. |
| 128 virtual void OnRendererForegrounded() = 0; | 128 virtual void OnRendererForegrounded() = 0; |
| 129 | 129 |
| 130 // Tells the scheduler that the render process should be suspended. This can | 130 // Tells the scheduler that the render process should be suspended. This can |
| 131 // only be done when the renderer is backgrounded. The renderer will be | 131 // only be done when the renderer is backgrounded. The renderer will be |
| 132 // automatically resumed when foregrounded. | 132 // automatically resumed when foregrounded. |
| 133 virtual void SuspendRenderer() = 0; | 133 virtual void SuspendRenderer() = 0; |
| 134 | 134 |
| 135 // Tells the scheduler that the render process should be resumeed. This can | |
|
hajimehoshi
2016/09/30 11:22:46
s/resumeed/resumed/
tasak
2016/10/03 05:44:16
Done.
| |
| 136 // only be done when the renderer is suspended. The renderer will be | |
| 137 // automatically suspended again if continuously backgrounded. | |
| 138 virtual void ResumeRenderer() = 0; | |
| 139 | |
| 135 // Tells the scheduler that a navigation task is pending. While any main-frame | 140 // Tells the scheduler that a navigation task is pending. While any main-frame |
| 136 // navigation tasks are pending, the scheduler will ensure that loading tasks | 141 // navigation tasks are pending, the scheduler will ensure that loading tasks |
| 137 // are not blocked even if they are expensive. Must be called on the main | 142 // are not blocked even if they are expensive. Must be called on the main |
| 138 // thread. | 143 // thread. |
| 139 virtual void AddPendingNavigation(WebScheduler::NavigatingFrameType type) = 0; | 144 virtual void AddPendingNavigation(WebScheduler::NavigatingFrameType type) = 0; |
| 140 | 145 |
| 141 // Tells the scheduler that a navigation task is no longer pending. | 146 // Tells the scheduler that a navigation task is no longer pending. |
| 142 // Must be called on the main thread. | 147 // Must be called on the main thread. |
| 143 virtual void RemovePendingNavigation( | 148 virtual void RemovePendingNavigation( |
| 144 WebScheduler::NavigatingFrameType type) = 0; | 149 WebScheduler::NavigatingFrameType type) = 0; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 185 |
| 181 protected: | 186 protected: |
| 182 RendererScheduler(); | 187 RendererScheduler(); |
| 183 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 188 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 184 }; | 189 }; |
| 185 | 190 |
| 186 } // namespace scheduler | 191 } // namespace scheduler |
| 187 } // namespace blink | 192 } // namespace blink |
| 188 | 193 |
| 189 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ | 194 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ |
| OLD | NEW |