[PM] Migrate IsolationContextMetrics to use public observer API.

This also lifts a few node accessor functions to the public Graph API.

BUG=910288

Change-Id: Ib1df9088175c53fabe39a4559c1f7fb396b697db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686013
Commit-Queue: Chris Hamilton <[email protected]>
Auto-Submit: Chris Hamilton <[email protected]>
Reviewed-by: Sigurður Ásgeirsson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#674486}
diff --git a/chrome/browser/performance_manager/public/graph/graph.h b/chrome/browser/performance_manager/public/graph/graph.h
index 0cc76500..efdb217 100644
--- a/chrome/browser/performance_manager/public/graph/graph.h
+++ b/chrome/browser/performance_manager/public/graph/graph.h
@@ -15,9 +15,13 @@
 
 class GraphObserver;
 class GraphOwned;
+class FrameNode;
 class FrameNodeObserver;
+class PageNode;
 class PageNodeObserver;
+class ProcessNode;
 class ProcessNodeObserver;
+class SystemNode;
 class SystemNodeObserver;
 
 // Represents a graph of the nodes representing a single browser. Maintains a
@@ -60,6 +64,12 @@
         static_cast<DerivedType*>(TakeFromGraph(graph_owned).release()));
   }
 
+  // Returns a collection of all known nodes of the given type.
+  virtual const SystemNode* FindOrCreateSystemNode() = 0;
+  virtual std::vector<const FrameNode*> GetAllFrameNodes() const = 0;
+  virtual std::vector<const PageNode*> GetAllPageNodes() const = 0;
+  virtual std::vector<const ProcessNode*> GetAllProcessNodes() 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.