Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: ui/ozone/platform/test/test_window_manager.h

Issue 377973005: ozone: test: Convert to PlatformWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add dcheck Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/test/test_window.cc ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61%
rename from ui/ozone/platform/test/file_surface_factory.h
rename to ui/ozone/platform/test/test_window_manager.h
index 54ab1046e266e2dfd3197fbea3d5b02065ca52aa..e88a65d3b1339eee7e8433075fd90c281dd59fa6 100644
--- a/ui/ozone/platform/test/file_surface_factory.h
+++ b/ui/ozone/platform/test/test_window_manager.h
@@ -6,18 +6,31 @@
#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();
+
+ // Initialize (mainly check that we have a place to write output to).
+ void Initialize();
+
+ // 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 +41,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
« no previous file with comments | « ui/ozone/platform/test/test_window.cc ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698