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.
5 #ifndef UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_
6 #define UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_
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"
19 class TestWindowManager
{
21 explicit TestWindowManager(const base::FilePath
& dump_location
);
24 // Initialize (mainly check that we have a place to write output to).
27 // Register a new window. Returns the window id.
28 int32_t AddWindow(TestWindow
* window
);
31 void RemoveWindow(int32_t window_id
, TestWindow
* window
);
33 // Find a window object by id;
34 TestWindow
* GetWindow(int32_t window_id
);
36 // User-supplied path for images.
37 base::FilePath
base_path() const;
40 base::FilePath location_
;
42 IDMap
<TestWindow
> windows_
;
43 base::ThreadChecker thread_checker_
;
45 DISALLOW_COPY_AND_ASSIGN(TestWindowManager
);
50 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_