Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Unified Diff: services/resource_coordinator/coordination_unit/tab_signal_generator.h

Issue 2965553002: [GRC] Add Tab-scoped Coordination Unit Graph Observer (Closed)
Patch Set: Change observer name Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/resource_coordinator/coordination_unit/tab_signal_generator.h
diff --git a/services/resource_coordinator/coordination_unit/tab_signal_generator.h b/services/resource_coordinator/coordination_unit/tab_signal_generator.h
new file mode 100644
index 0000000000000000000000000000000000000000..5c5980d7f428d23283aa7162b8a21c56093881c7
--- /dev/null
+++ b/services/resource_coordinator/coordination_unit/tab_signal_generator.h
@@ -0,0 +1,32 @@
+// Copyright 2017 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 SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_TAB_SIGNAL_GENERATOR_H_
+#define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_TAB_SIGNAL_GENERATOR_H_
+
+#include "base/macros.h"
+#include "services/resource_coordinator/coordination_unit/coordination_unit_graph_observer.h"
+
+namespace resource_coordinator {
+
+class CoordinationUnitImpl;
+
+// The TabSignalGenerator is a unified |CoordinationUnitGraphObserver| for
+// calculating and emitting tab-scoped signals. Nonetheless, the observer
+// has access to the whole coordination unit graph and thus can utilize
+// the information contained within the entire graph to generate the signals.
+class TabSignalGenerator : public CoordinationUnitGraphObserver {
+ public:
+ TabSignalGenerator();
+ ~TabSignalGenerator() override;
+
+ bool ShouldObserve(const CoordinationUnitImpl* coordination_unit) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TabSignalGenerator);
+};
+
+} // namespace resource_coordinator
+
+#endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_TAB_SIGNAL_GENERATOR_H_

Powered by Google App Engine
This is Rietveld 408576698