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

Unified Diff: ui/ozone/platform/dri/ozone_platform_dri.cc

Issue 469343003: [Ozone-GBM] Pumb DriWindowDelegate throughout the platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest && rebase Created 6 years, 4 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/dri/hardware_display_controller.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/ozone_platform_dri.cc
diff --git a/ui/ozone/platform/dri/ozone_platform_dri.cc b/ui/ozone/platform/dri/ozone_platform_dri.cc
index 7087a9080c82cce52b90fff5ddad4ffcec58fc0e..c192527142fadd9099471afc9839e5df8d1c522a 100644
--- a/ui/ozone/platform/dri/ozone_platform_dri.cc
+++ b/ui/ozone/platform/dri/ozone_platform_dri.cc
@@ -12,6 +12,8 @@
#include "ui/ozone/platform/dri/dri_buffer.h"
#include "ui/ozone/platform/dri/dri_surface_factory.h"
#include "ui/ozone/platform/dri/dri_window.h"
+#include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
+#include "ui/ozone/platform/dri/dri_window_manager.h"
#include "ui/ozone/platform/dri/dri_wrapper.h"
#include "ui/ozone/platform/dri/screen_manager.h"
#include "ui/ozone/platform/dri/virtual_terminal_manager.h"
@@ -62,11 +64,15 @@ class OzonePlatformDri : public OzonePlatform {
virtual scoped_ptr<PlatformWindow> CreatePlatformWindow(
PlatformWindowDelegate* delegate,
const gfx::Rect& bounds) OVERRIDE {
- return scoped_ptr<PlatformWindow>(
- new DriWindow(delegate,
- bounds,
- surface_factory_ozone_.get(),
- event_factory_ozone_.get()));
+ scoped_ptr<DriWindow> platform_window(new DriWindow(
+ delegate,
+ bounds,
+ scoped_ptr<DriWindowDelegate>(new DriWindowDelegateImpl(
+ window_manager_.NextAcceleratedWidget(), screen_manager_.get())),
+ event_factory_ozone_.get(),
+ &window_manager_));
+ platform_window->Initialize();
+ return platform_window.PassAs<PlatformWindow>();
}
#if defined(OS_CHROMEOS)
virtual scoped_ptr<NativeDisplayDelegate> CreateNativeDisplayDelegate()
@@ -81,8 +87,8 @@ class OzonePlatformDri : public OzonePlatform {
}
#endif
virtual void InitializeUI() OVERRIDE {
- surface_factory_ozone_.reset(
- new DriSurfaceFactory(dri_.get(), screen_manager_.get()));
+ surface_factory_ozone_.reset(new DriSurfaceFactory(
+ dri_.get(), screen_manager_.get(), &window_manager_));
cursor_factory_ozone_.reset(
new CursorFactoryEvdevDri(surface_factory_ozone_.get()));
event_factory_ozone_.reset(new EventFactoryEvdev(
@@ -106,6 +112,8 @@ class OzonePlatformDri : public OzonePlatform {
scoped_ptr<CursorFactoryEvdevDri> cursor_factory_ozone_;
scoped_ptr<EventFactoryEvdev> event_factory_ozone_;
+ DriWindowManager window_manager_;
+
DISALLOW_COPY_AND_ASSIGN(OzonePlatformDri);
};
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_controller.cc ('k') | ui/ozone/platform/dri/ozone_platform_gbm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698