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
51
52
53
|
// Copyright 2019 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.
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SCHEDULER_WEB_SCHEDULER_TRACKED_FEATURE_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SCHEDULER_WEB_SCHEDULER_TRACKED_FEATURE_H_
namespace blink {
namespace scheduler {
// A list of features which influence scheduling behaviour (throttling /
// freezing / back-forward cache) and which might be sent to the browser process
// for metrics-related purposes.
enum class WebSchedulerTrackedFeature {
kWebSocket = 0,
kWebRTC = 1,
kMainResourceHasCacheControlNoCache = 2,
kMainResourceHasCacheControlNoStore = 3,
kSubresourceHasCacheControlNoCache = 4,
kSubresourceHasCacheControlNoStore = 5,
kPageShowEventListener = 6,
kPageHideEventListener = 7,
kBeforeUnloadEventListener = 8,
kUnloadEventListener = 9,
kFreezeEventListener = 10,
kResumeEventListener = 11,
kContainsPlugins = 12,
kDocumentLoaded = 13,
kDedicatedWorkerOrWorklet = 14,
kOutstandingNetworkRequest = 15,
// TODO(altimin): This doesn't include service worker-controlled origins.
// We need to track them too.
kServiceWorkerControlledPage = 16,
kOutstandingIndexedDBTransaction = 17,
// Whether there are other pages which can potentially synchronously script
// the current one (e.g. due to window.open being used).
// This is a conservative estimation which doesn't take into account the
// origin, so it may be true if the related page is cross-origin.
// Recorded only for the main frame.
kHasScriptableFramesInMultipleTabs = 18,
kMaxValue = kHasScriptableFramesInMultipleTabs
};
} // namespace scheduler
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_SCHEDULER_WEB_SCHEDULER_TRACKED_FEATURE_H_
|