Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / ozone / platform / test / test_window_manager.h
blobb7adc143746c1a9a12268c63556161a7afa743aa
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"
15 namespace ui {
17 class TestWindow;
19 class TestWindowManager {
20 public:
21 explicit TestWindowManager(const base::FilePath& dump_location);
22 ~TestWindowManager();
24 // Initialize (mainly check that we have a place to write output to).
25 void Initialize();
27 // Register a new window. Returns the window id.
28 int32_t AddWindow(TestWindow* window);
30 // Remove a 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;
39 private:
40 base::FilePath location_;
42 IDMap<TestWindow> windows_;
43 base::ThreadChecker thread_checker_;
45 DISALLOW_COPY_AND_ASSIGN(TestWindowManager);
48 } // namespace ui
50 #endif // UI_OZONE_PLATFORM_TEST_TEST_WINDOW_MANAGER_H_