blob: 3c92cd7cc4f2c2b429f350a021e9f754b4399486 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/power_scheduler/power_mode.h"
#include "base/trace_event/trace_event.h"
namespace power_scheduler {
const char* PowerModeToString(PowerMode mode) {
switch (mode) {
case PowerMode::kIdle:
return "Idle";
case PowerMode::kNopAnimation:
return "NopAnimation";
case PowerMode::kSmallMainThreadAnimation:
return "SmallMainThreadAnimation";
case PowerMode::kSmallAnimation:
return "SmallAnimation";
case PowerMode::kMediumMainThreadAnimation:
return "MediumMainThreadAnimation";
case PowerMode::kMediumAnimation:
return "MediumAnimation";
case PowerMode::kAudible:
return "Audible";
case PowerMode::kVideoPlayback:
return "VideoPlayback";
case PowerMode::kMainThreadAnimation:
return "MainThreadAnimation";
case PowerMode::kScriptExecution:
return "ScriptExecution";
case PowerMode::kLoading:
return "Loading";
case PowerMode::kAnimation:
return "Animation";
case PowerMode::kLoadingAnimation:
return "LoadingAnimation";
case PowerMode::kResponse:
return "Response";
case PowerMode::kNonWebActivity:
return "NonWebActivity";
case PowerMode::kBackground:
return "Background";
case PowerMode::kCharging:
return "Charging";
}
}
} // namespace power_scheduler
|