| Index: ui/ozone/platform/caca/caca_window_manager.h
|
| diff --git a/ui/ozone/platform/caca/caca_surface_factory.h b/ui/ozone/platform/caca/caca_window_manager.h
|
| similarity index 52%
|
| rename from ui/ozone/platform/caca/caca_surface_factory.h
|
| rename to ui/ozone/platform/caca/caca_window_manager.h
|
| index a07033ae54bbac9a920fe89ba1f221306729f5f7..242b9d4dc98be925329173371a61642951b3e67b 100644
|
| --- a/ui/ozone/platform/caca/caca_surface_factory.h
|
| +++ b/ui/ozone/platform/caca/caca_window_manager.h
|
| @@ -2,26 +2,31 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_
|
| -#define UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_
|
| -
|
| -#include <caca.h>
|
| +#ifndef UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_
|
| +#define UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_
|
|
|
| +#include "base/id_map.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "ui/ozone/public/surface_factory_ozone.h"
|
|
|
| namespace gfx {
|
| -class SurfaceOzone;
|
| +class Rect;
|
| }
|
|
|
| namespace ui {
|
|
|
| -class CacaConnection;
|
| +class CacaWindow;
|
|
|
| -class CacaSurfaceFactory : public ui::SurfaceFactoryOzone {
|
| +class CacaWindowManager : public SurfaceFactoryOzone {
|
| public:
|
| - CacaSurfaceFactory(CacaConnection* connection);
|
| - virtual ~CacaSurfaceFactory();
|
| + CacaWindowManager();
|
| + virtual ~CacaWindowManager();
|
| +
|
| + // Register a new libcaca window/instance. Returns the window id.
|
| + int32_t AddWindow(CacaWindow* window);
|
| +
|
| + // Remove a libcaca window/instance.
|
| + void RemoveWindow(int32_t window_id, CacaWindow* window);
|
|
|
| // ui::SurfaceFactoryOzone overrides:
|
| virtual HardwareState InitializeHardware() OVERRIDE;
|
| @@ -30,17 +35,15 @@ class CacaSurfaceFactory : public ui::SurfaceFactoryOzone {
|
| virtual bool LoadEGLGLES2Bindings(
|
| AddGLLibraryCallback add_gl_library,
|
| SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE;
|
| - virtual scoped_ptr<ui::SurfaceOzoneCanvas> CreateCanvasForWidget(
|
| + virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
|
| gfx::AcceleratedWidget widget) OVERRIDE;
|
|
|
| private:
|
| - HardwareState state_;
|
| -
|
| - CacaConnection* connection_; // Not owned.
|
| + IDMap<CacaWindow> windows_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(CacaSurfaceFactory);
|
| + DISALLOW_COPY_AND_ASSIGN(CacaWindowManager);
|
| };
|
|
|
| } // namespace ui
|
|
|
| -#endif // UI_OZONE_PLATFORM_CACA_CACA_SURFACE_FACTORY_H_
|
| +#endif // UI_OZONE_PLATFORM_CACA_CACA_WINDOW_MANAGER_H_
|
|
|