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

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

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.cc
diff --git a/services/resource_coordinator/coordination_unit/tab_signal_generator.cc b/services/resource_coordinator/coordination_unit/tab_signal_generator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7cc179e6a1b080456fef1bfbd15a42bbd7116db8
--- /dev/null
+++ b/services/resource_coordinator/coordination_unit/tab_signal_generator.cc
@@ -0,0 +1,20 @@
+// 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.
+
+#include "services/resource_coordinator/coordination_unit/tab_signal_generator.h"
+
+#include "services/resource_coordinator/coordination_unit/coordination_unit_impl.h"
+
+namespace resource_coordinator {
+
+TabSignalGenerator::TabSignalGenerator() = default;
+
+TabSignalGenerator::~TabSignalGenerator() = default;
+
+bool TabSignalGenerator::ShouldObserve(
+ const CoordinationUnitImpl* coordination_unit) {
+ return coordination_unit->id().type == CoordinationUnitType::kWebContents;
+}
+
+} // namespace resource_coordinator

Powered by Google App Engine
This is Rietveld 408576698