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