1 // Copyright 2019 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_RAIL_MODE_OBSERVER_H_ 6 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_RAIL_MODE_OBSERVER_H_ 7 8 namespace blink { 9 10 // RAIL mode as defined in [1]. 11 // [1] https://developers.google.com/web/fundamentals/performance/rail 12 enum class RAILMode { 13 kResponse, 14 kAnimation, 15 kIdle, 16 kLoad, 17 }; 18 19 class RAILModeObserver { 20 public: 21 virtual ~RAILModeObserver() = default; 22 virtual void OnRAILModeChanged(RAILMode rail_mode) = 0; 23 }; 24 25 } // namespace blink 26 27 #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_RAIL_MODE_OBSERVER_H_ 28