commit | f86f63429a17b44f16afd3047f13437b934213b0 | [log] [tgz] |
---|---|---|
author | Chris Hamilton <[email protected]> | Tue Mar 30 16:42:34 2021 |
committer | Chromium LUCI CQ <[email protected]> | Tue Mar 30 16:42:34 2021 |
tree | ae850bf774d4b4758d98b4046498088f67fb17c6 | |
parent | 9783f92da298e6d803d8dcf9034caee0ec03b48f [diff] [blame] |
[PM] Add lifecycle states to PM nodes. This gives nodes a clear lifecycle, and also prohibits property changes during critical state changes (notifications of joining and leaving graph). BUG=1192777 Change-Id: Ieea9324d28defb38b3150edab942fdd6a059ec23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2787365 Reviewed-by: Sigurður Ásgeirsson <[email protected]> Commit-Queue: Chris Hamilton <[email protected]> Cr-Commit-Position: refs/heads/master@{#867650}
diff --git a/components/performance_manager/public/graph/node.h b/components/performance_manager/public/graph/node.h index d3c2cc11..b3a95d4 100644 --- a/components/performance_manager/public/graph/node.h +++ b/components/performance_manager/public/graph/node.h
@@ -8,6 +8,7 @@ #include <cstdint> #include "base/macros.h" +#include "components/performance_manager/public/graph/node_state.h" namespace performance_manager { @@ -24,6 +25,9 @@ // Returns the graph to which this node belongs. virtual Graph* GetGraph() const = 0; + // Returns the state of this node. + virtual NodeState GetNodeState() const = 0; + // The following functions are implementation detail and should not need to be // used by external clients. They provide the ability to safely downcast to // the underlying implementation.