Chromium Code Reviews| Index: ui/ozone/platform/caca/ozone_platform_caca.cc |
| diff --git a/ui/ozone/platform/caca/ozone_platform_caca.cc b/ui/ozone/platform/caca/ozone_platform_caca.cc |
| index c14ef990ab96438bb6ac2e7a574bc21346fcc735..2b16e91140c3d6e9a8b437b99b1ae49029bae600 100644 |
| --- a/ui/ozone/platform/caca/ozone_platform_caca.cc |
| +++ b/ui/ozone/platform/caca/ozone_platform_caca.cc |
| @@ -5,9 +5,9 @@ |
| #include "ui/ozone/platform/caca/ozone_platform_caca.h" |
| #include "ui/ozone/common/platform_window_base.h" |
| -#include "ui/ozone/platform/caca/caca_connection.h" |
| #include "ui/ozone/platform/caca/caca_event_factory.h" |
| -#include "ui/ozone/platform/caca/caca_surface_factory.h" |
| +#include "ui/ozone/platform/caca/caca_window.h" |
| +#include "ui/ozone/platform/caca/caca_window_manager.h" |
| #include "ui/ozone/public/cursor_factory_ozone.h" |
| #include "ui/ozone/public/ozone_platform.h" |
| @@ -27,7 +27,7 @@ class OzonePlatformCaca : public OzonePlatform { |
| // OzonePlatform: |
| virtual ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() OVERRIDE { |
| - return surface_factory_ozone_.get(); |
| + return window_manager_.get(); |
| } |
| virtual EventFactoryOzone* GetEventFactoryOzone() OVERRIDE { |
| return event_factory_ozone_.get(); |
| @@ -43,9 +43,12 @@ class OzonePlatformCaca : public OzonePlatform { |
| } |
| virtual scoped_ptr<PlatformWindow> CreatePlatformWindow( |
| PlatformWindowDelegate* delegate, |
| - const gfx::Rect& bounds) OVERRIDE { |
| - return make_scoped_ptr<PlatformWindow>( |
| - new PlatformWindowCompat(delegate, bounds)); |
| + const gfx::Rect& bounds) { |
| + scoped_ptr<CacaWindow> caca_window(new CacaWindow( |
| + delegate, window_manager_.get(), event_factory_ozone_.get(), bounds)); |
| + if (!caca_window->Initialize()) |
| + return scoped_ptr<PlatformWindow>(); |
| + return caca_window.PassAs<PlatformWindow>(); |
| } |
| #if defined(OS_CHROMEOS) |
| @@ -61,16 +64,15 @@ class OzonePlatformCaca : public OzonePlatform { |
| #endif |
| virtual void InitializeUI() OVERRIDE { |
| - surface_factory_ozone_.reset(new CacaSurfaceFactory(&connection_)); |
| - event_factory_ozone_.reset(new CacaEventFactory(&connection_)); |
| + window_manager_.reset(new CacaWindowManager); |
| + event_factory_ozone_.reset(new CacaEventFactory()); |
| cursor_factory_ozone_.reset(new CursorFactoryOzone()); |
| } |
| virtual void InitializeGPU() OVERRIDE {} |
| private: |
| - CacaConnection connection_; |
| - scoped_ptr<CacaSurfaceFactory> surface_factory_ozone_; |
| + scoped_ptr<CacaWindowManager> window_manager_; |
| scoped_ptr<CacaEventFactory> event_factory_ozone_; |
| scoped_ptr<CursorFactoryOzone> cursor_factory_ozone_; |
| @@ -82,3 +84,4 @@ class OzonePlatformCaca : public OzonePlatform { |
| OzonePlatform* CreateOzonePlatformCaca() { return new OzonePlatformCaca; } |
| } // namespace ui |
| + |
|
dnicoara
2014/07/17 17:27:54
nit: Remove line.
spang
2014/07/17 19:50:41
Done.
|