| Index: ui/ozone/platform/test/test_window_manager.h
|
| diff --git a/ui/ozone/platform/test/file_surface_factory.h b/ui/ozone/platform/test/test_window_manager.h
|
| similarity index 65%
|
| rename from ui/ozone/platform/test/file_surface_factory.h
|
| rename to ui/ozone/platform/test/test_window_manager.h
|
| index 54ab1046e266e2dfd3197fbea3d5b02065ca52aa..bba78b73506d4f12296676fba7633808f1a95955 100644
|
| --- a/ui/ozone/platform/test/file_surface_factory.h
|
| +++ b/ui/ozone/platform/test/test_window_manager.h
|
| @@ -6,18 +6,28 @@
|
| #define UI_OZONE_PLATFORM_TEST_FILE_SURFACE_FACTORY_H_
|
|
|
| #include "base/files/file_path.h"
|
| +#include "base/id_map.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| +#include "ui/ozone/platform/test/test_window.h"
|
| #include "ui/ozone/public/surface_factory_ozone.h"
|
|
|
| namespace ui {
|
|
|
| -class OZONE_BASE_EXPORT FileSurfaceFactory : public SurfaceFactoryOzone {
|
| +class TestWindowManager : public SurfaceFactoryOzone {
|
| public:
|
| - explicit FileSurfaceFactory(const base::FilePath& dump_location);
|
| - virtual ~FileSurfaceFactory();
|
| + explicit TestWindowManager(const base::FilePath& dump_location);
|
| + virtual ~TestWindowManager();
|
| +
|
| + // Register a new window. Returns the window id.
|
| + int32_t AddWindow(TestWindow* window);
|
| +
|
| + // Remove a window.
|
| + void RemoveWindow(int32_t window_id, TestWindow* window);
|
| +
|
| + // User-supplied path for images.
|
| + base::FilePath base_path() const;
|
|
|
| - private:
|
| // SurfaceFactoryOzone:
|
| virtual HardwareState InitializeHardware() OVERRIDE;
|
| virtual void ShutdownHardware() OVERRIDE;
|
| @@ -28,9 +38,12 @@ class OZONE_BASE_EXPORT FileSurfaceFactory : public SurfaceFactoryOzone {
|
| AddGLLibraryCallback add_gl_library,
|
| SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
|
|
|
| + private:
|
| base::FilePath location_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FileSurfaceFactory);
|
| + IDMap<TestWindow> windows_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TestWindowManager);
|
| };
|
|
|
| } // namespace ui
|
|
|