1 // Copyright 2013 The Flutter Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 // 2021.2.10 Framework adapted to ACE. 5 // Copyright (c) 2021 Huawei Device Co., Ltd. All rights reserved. 6 7 #ifndef FLUTTER_RUNTIME_ACE_RUNTIME_WINDOW_MANAGER_H_ 8 #define FLUTTER_RUNTIME_ACE_RUNTIME_WINDOW_MANAGER_H_ 9 10 #include <map> 11 #include <mutex> 12 13 #include "flutter/fml/macros.h" 14 #include "flutter/lib/ui/window/window.h" 15 16 namespace flutter { 17 18 class WindowManager { 19 public: 20 static void AddWindow(int32_t instance_id, std::unique_ptr<Window> window); 21 static Window* GetWindow(int32_t instance_id); 22 static void RemoveWindow(int32_t instance_id); 23 private: 24 static std::map<int32_t, std::unique_ptr<Window>> window_map_; 25 static std::mutex mutex_; 26 FML_DISALLOW_COPY_AND_ASSIGN(WindowManager); 27 }; 28 29 } // flutter 30 31 #endif // FLUTTER_RUNTIME_ACE_RUNTIME_WINDOW_MANAGER_H_ 32