blob: b7dd1b87f3de928eb4dc08068fb7face216240e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/platform/scheduler/public/scheduling_lifecycle_state.h"
#include "base/logging.h"
namespace blink {
namespace scheduler {
// static
const char* SchedulingLifecycleStateToString(SchedulingLifecycleState state) {
switch (state) {
case SchedulingLifecycleState::kNotThrottled:
return "not throttled";
case SchedulingLifecycleState::kHidden:
return "hidden";
case SchedulingLifecycleState::kThrottled:
return "throttled";
case SchedulingLifecycleState::kStopped:
return "frozen";
default:
NOTREACHED();
return nullptr;
}
}
} // namespace scheduler
} // namespace blink
|