| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium 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 | |
| 5 #ifndef UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_ | |
| 6 #define UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <memory> | |
| 11 | |
| 12 #include "base/id_map.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "base/threading/thread_checker.h" | |
| 15 #include "ui/ozone/public/surface_factory_ozone.h" | |
| 16 | |
| 17 namespace gfx { | |
| 18 class Rect; | |
| 19 } | |
| 20 | |
| 21 namespace ui { | |
| 22 | |
| 23 class CacaWindow; | |
| 24 | |
| 25 class CacaWindowManager : public SurfaceFactoryOzone { | |
| 26 public: | |
| 27 CacaWindowManager(); | |
| 28 ~CacaWindowManager() override; | |
| 29 | |
| 30 // Register a new libcaca window/instance. Returns the window id. | |
| 31 int32_t AddWindow(CacaWindow* window); | |
| 32 | |
| 33 // Remove a libcaca window/instance. | |
| 34 void RemoveWindow(int32_t window_id, CacaWindow* window); | |
| 35 | |
| 36 // ui::SurfaceFactoryOzone overrides: | |
| 37 std::unique_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( | |
| 38 gfx::AcceleratedWidget widget) override; | |
| 39 | |
| 40 private: | |
| 41 IDMap<CacaWindow> windows_; | |
| 42 base::ThreadChecker thread_checker_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(CacaWindowManager); | |
| 45 }; | |
| 46 | |
| 47 } // namespace ui | |
| 48 | |
| 49 #endif // UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_ | |
| OLD | NEW |