| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The renderer scheduler maintains an estimated RAIL mode[1]. This observer | 183 // The renderer scheduler maintains an estimated RAIL mode[1]. This observer |
| 184 // can be used to get notified when the mode changes. The observer will be | 184 // can be used to get notified when the mode changes. The observer will be |
| 185 // called on the main thread and must outlive this class. | 185 // called on the main thread and must outlive this class. |
| 186 // [1] | 186 // [1] |
| 187 // https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-pe
rformance/rail | 187 // https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-pe
rformance/rail |
| 188 virtual void SetRAILModeObserver(RAILModeObserver* observer) = 0; | 188 virtual void SetRAILModeObserver(RAILModeObserver* observer) = 0; |
| 189 | 189 |
| 190 // Returns whether or not the main thread appears unresponsive, based on the | 190 // Returns whether or not the main thread appears unresponsive, based on the |
| 191 // length and frequency of recent main thread tasks. To be called from the | 191 // length and frequency of recent main thread tasks. To be called from the |
| 192 // compositor thread. | 192 // compositor thread. |
| 193 virtual bool MainThreadSeemsUnresponsive() = 0; | 193 virtual bool MainThreadSeemsUnresponsive( |
| 194 base::TimeDelta main_thread_responsiveness_threshold) = 0; |
| 194 | 195 |
| 195 protected: | 196 protected: |
| 196 RendererScheduler(); | 197 RendererScheduler(); |
| 197 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 198 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 198 }; | 199 }; |
| 199 | 200 |
| 200 } // namespace scheduler | 201 } // namespace scheduler |
| 201 } // namespace blink | 202 } // namespace blink |
| 202 | 203 |
| 203 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ | 204 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_H_ |
| OLD | NEW |