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_TEST_TEST_WINDOW_MANAGER_H_ | |
6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/id_map.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/threading/thread_checker.h" | |
12 #include "ui/gfx/native_widget_types.h" | |
13 #include "ui/ozone/public/surface_factory_ozone.h" | |
14 | |
15 namespace ui { | |
16 | |
17 class TestWindow; | |
18 | |
19 class TestWindowManager { | |
20 public: | |
21 explicit TestWindowManager(const base::FilePath& dump_location); | |
22 ~TestWindowManager(); | |
23 | |
24 // Initialize (mainly check that we have a place to write output to). | |
25 void Initialize(); | |
26 | |
27 // Register a new window. Returns the window id. | |
28 int32_t AddWindow(TestWindow* window); | |
29 | |
30 // Remove a window. | |
31 void RemoveWindow(int32_t window_id, TestWindow* window); | |
32 | |
33 // Find a window object by id; | |
34 TestWindow* GetWindow(int32_t window_id); | |
35 | |
36 // User-supplied path for images. | |
37 base::FilePath base_path() const; | |
38 | |
39 private: | |
40 base::FilePath location_; | |
41 | |
42 IDMap<TestWindow> windows_; | |
43 base::ThreadChecker thread_checker_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(TestWindowManager); | |
46 }; | |
47 | |
48 } // namespace ui | |
49 | |
50 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_ | |
OLD | NEW |