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

Unified Diff: components/mus/ws/window_manager_factory_registry.h

Issue 1755223002: Adds WindowManagerManager to mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and WindowManagerState Created 4 years, 10 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: components/mus/ws/window_manager_factory_registry.h
diff --git a/components/mus/ws/window_manager_factory_registry.h b/components/mus/ws/window_manager_factory_registry.h
new file mode 100644
index 0000000000000000000000000000000000000000..519257deee3267f974fb8ba376a93b89c3d00043
--- /dev/null
+++ b/components/mus/ws/window_manager_factory_registry.h
@@ -0,0 +1,52 @@
+// Copyright 2016 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 COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_
+#define COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_
+
+#include <stdint.h>
+
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "components/mus/public/interfaces/window_manager_factory.mojom.h"
+
+namespace mus {
+namespace ws {
+
+class ConnectionManager;
+class WindowManagerFactoryService;
+
+// WindowManagerFactoryRegistry tracks the set of registered
+// WindowManagerFactoryServices.
+class WindowManagerFactoryRegistry {
+ public:
+ explicit WindowManagerFactoryRegistry(ConnectionManager* connection_manager);
+ ~WindowManagerFactoryRegistry();
+
+ void Register(
+ uint32_t user_id,
+ mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request);
+
+ std::vector<WindowManagerFactoryService*> GetServices();
+
+ private:
+ friend class WindowManagerFactoryService;
+
+ void OnWindowManagerFactoryConnectionLost(
+ WindowManagerFactoryService* service);
+ void OnWindowManagerFactorySet();
+
+ ConnectionManager* connection_manager_;
+
+ std::vector<scoped_ptr<WindowManagerFactoryService>> services_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowManagerFactoryRegistry);
+};
+
+} // namespace ws
+} // namespace mus
+
+#endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_FACTORY_REGISTRY_H_
« no previous file with comments | « components/mus/ws/window_manager_access_policy.cc ('k') | components/mus/ws/window_manager_factory_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698