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

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

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 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: 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
deleted file mode 100644
index ca60fa283adaefd421c38c9825652c8dbd8515f7..0000000000000000000000000000000000000000
--- a/components/mus/ws/window_manager_factory_registry.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// 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 <memory>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "components/mus/public/interfaces/window_manager_factory.mojom.h"
-#include "components/mus/ws/user_id_tracker_observer.h"
-
-namespace mus {
-namespace ws {
-
-class UserIdTracker;
-class WindowManagerFactoryRegistryObserver;
-class WindowManagerFactoryService;
-class WindowServer;
-
-namespace test {
-class WindowManagerFactoryRegistryTestApi;
-}
-
-// WindowManagerFactoryRegistry tracks the set of registered
-// WindowManagerFactoryServices.
-class WindowManagerFactoryRegistry : public UserIdTrackerObserver {
- public:
- WindowManagerFactoryRegistry(WindowServer* window_server,
- UserIdTracker* tracker);
- ~WindowManagerFactoryRegistry() override;
-
- void Register(
- const UserId& user_id,
- mojo::InterfaceRequest<mojom::WindowManagerFactoryService> request);
-
- std::vector<WindowManagerFactoryService*> GetServices();
-
- void AddObserver(WindowManagerFactoryRegistryObserver* observer);
- void RemoveObserver(WindowManagerFactoryRegistryObserver* observer);
-
- private:
- friend class WindowManagerFactoryService;
- friend class test::WindowManagerFactoryRegistryTestApi;
-
- void AddServiceImpl(std::unique_ptr<WindowManagerFactoryService> service);
-
- bool ContainsServiceForUser(const UserId& user_id) const;
- void OnWindowManagerFactoryConnectionLost(
- WindowManagerFactoryService* service);
- void OnWindowManagerFactorySet(WindowManagerFactoryService* service);
-
- // UserIdTrackerObserver:
- void OnActiveUserIdChanged(const UserId& previously_active_id,
- const UserId& active_id) override;
- void OnUserIdAdded(const UserId& id) override;
- void OnUserIdRemoved(const UserId& id) override;
-
- // Set to true the first time a valid factory has been found.
- bool got_valid_factory_ = false;
- UserIdTracker* id_tracker_;
- WindowServer* window_server_;
-
- std::vector<std::unique_ptr<WindowManagerFactoryService>> services_;
-
- base::ObserverList<WindowManagerFactoryRegistryObserver> observers_;
-
- 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_client_unittest.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