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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 // driven by this process. A stricter condition than |OnRendererHidden()|, the | 120 // driven by this process. A stricter condition than |OnRendererHidden()|, the |
121 // process is assumed to be foregrounded when the scheduler is constructed. | 121 // process is assumed to be foregrounded when the scheduler is constructed. |
122 // Must be called on the main thread. | 122 // Must be called on the main thread. |
123 virtual void OnRendererBackgrounded() = 0; | 123 virtual void OnRendererBackgrounded() = 0; |
124 | 124 |
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 renderer process has started or stopped | |
131 // playing audio. | |
132 // Must be called on main thread. | |
Sami
2016/09/30 11:52:09
nit: move to previous line.
altimin
2016/10/03 11:15:26
Acknowledged.
| |
133 virtual void OnAudioStateChanged(bool is_audio_active) = 0; | |
Sami
2016/09/30 11:52:09
nit: is_playing for consistency with the impls (or
altimin
2016/10/03 11:15:26
Acknowledged.
| |
134 | |
130 // Tells the scheduler that the render process should be suspended. This can | 135 // 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 | 136 // only be done when the renderer is backgrounded. The renderer will be |
132 // automatically resumed when foregrounded. | 137 // automatically resumed when foregrounded. |
133 virtual void SuspendRenderer() = 0; | 138 virtual void SuspendRenderer() = 0; |
134 | 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; |
(...skipping 40 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 |