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 MEDIA_LEARNING_COMMON_FEATURE_LIBRARY_H_
6 #define MEDIA_LEARNING_COMMON_FEATURE_LIBRARY_H_
7
8 #include "base/component_export.h"
9 #include "base/macros.h"
10 #include "media/learning/common/learning_task.h"
11
12 namespace media {
13 namespace learning {
14
15 // This class provides feature descriptions for common features provided by the
16 // learning framework. When creating a LearningTask, one may choose to include
17 // these in the feature descriptions:
18 //
19 // LearningTask my_task;
20 // my_task.feature_descriptions.push_back(FeatureLibrary::NetworkType());
COMPONENT_EXPORT(LEARNING_COMMON)21 struct COMPONENT_EXPORT(LEARNING_COMMON) FeatureLibrary {
22 // Common browser features
23 // Current network connection type (wired, 3G, etc.).
24 static LearningTask::ValueDescription NetworkType();
25
26 // Is the device on battery power?
27 static LearningTask::ValueDescription BatteryPower();
28
29 // TODO(liberato): add CpuLoad, ConcurrentMediaPlayers, NetworkUsage, Battery.
30
31 // Common renderer features
32 // TODO(liberato): Add Element{Type, Path, Id, Name}, visibility, size, other
33 // DOM structure features.
34 };
35
36 } // namespace learning
37 } // namespace media
38
39 #endif // MEDIA_LEARNING_COMMON_FEATURE_LIBRARY_H_
40