Introduce scaffolding for glic background mode manager and configuration
Adds the glic background mode manager to global features. It owns the
configuration service which listens to pref changes and notifies the
manager.
Low-Coverage-Reason: TRIVIAL_CHANGE global_features.cc changes are trivial
Fixed: 378141058
Change-Id: I35403eb3c3f1828c9398682e45275ecd6904abdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6023661
Reviewed-by: Nico Weber <[email protected]>
Code-Coverage: [email protected] <[email protected]>
Reviewed-by: Eshwar Stalin <[email protected]>
Commit-Queue: Charles Meng <[email protected]>
Auto-Submit: Charles Meng <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1386399}
diff --git a/chrome/browser/global_features.h b/chrome/browser/global_features.h
index dd5e550..b17fdcb 100644
--- a/chrome/browser/global_features.h
+++ b/chrome/browser/global_features.h
@@ -19,6 +19,8 @@
#endif
} // namespace whats_new
+class GlicBackgroundModeManager;
+
// This class owns the core controllers for features that are globally
// scoped on desktop. It can be subclassed by tests to perform
// dependency injection.
@@ -51,6 +53,12 @@
}
#endif
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ GlicBackgroundModeManager* glic_background_mode_manager() {
+ return glic_background_mode_manager_.get();
+ }
+#endif
+
protected:
GlobalFeatures();
@@ -73,6 +81,10 @@
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
std::unique_ptr<whats_new::WhatsNewRegistry> whats_new_registry_;
#endif
+
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
+ std::unique_ptr<GlicBackgroundModeManager> glic_background_mode_manager_;
+#endif
};
#endif // CHROME_BROWSER_GLOBAL_FEATURES_H_