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

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

Issue 469343003: [Ozone-GBM] Pumb DriWindowDelegate throughout the platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
Index: ui/ozone/platform/dri/dri_window.cc
diff --git a/ui/ozone/platform/dri/dri_window.cc b/ui/ozone/platform/dri/dri_window.cc
index 1f0b567ec6f324b39ff04f5d5bf2ef7efff321e0..cdd7d156811b15d0887eb4309a216b4144b959d0 100644
--- a/ui/ozone/platform/dri/dri_window.cc
+++ b/ui/ozone/platform/dri/dri_window.cc
@@ -7,25 +7,30 @@
#include "ui/events/event.h"
#include "ui/events/ozone/evdev/event_factory_evdev.h"
#include "ui/events/platform/platform_event_source.h"
-#include "ui/ozone/platform/dri/dri_surface_factory.h"
+#include "ui/ozone/platform/dri/dri_window_delegate.h"
#include "ui/ozone/public/cursor_factory_ozone.h"
-#include "ui/ozone/public/surface_factory_ozone.h"
#include "ui/platform_window/platform_window_delegate.h"
namespace ui {
DriWindow::DriWindow(PlatformWindowDelegate* delegate,
const gfx::Rect& bounds,
- DriSurfaceFactory* surface_factory,
+ scoped_ptr<DriWindowDelegate> dri_window_delegate,
EventFactoryEvdev* event_factory)
- : delegate_(delegate), bounds_(bounds), event_factory_(event_factory) {
- widget_ = surface_factory->GetAcceleratedWidget();
+ : delegate_(delegate),
+ bounds_(bounds),
+ widget_(dri_window_delegate->GetAcceleratedWidget()),
+ dri_window_delegate_(dri_window_delegate.Pass()),
+ event_factory_(event_factory) {
+ dri_window_delegate_->Initialize();
alexst (slow to review) 2014/08/20 21:51:09 My enemy, constructor workload is back! :) Can we
dnicoara 2014/08/21 20:54:17 I no longer care and I just want this to go in so
+ dri_window_delegate_->OnBoundsChanged(bounds);
delegate_->OnAcceleratedWidgetAvailable(widget_);
PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
}
DriWindow::~DriWindow() {
PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
+ dri_window_delegate_->Shutdown();
}
void DriWindow::Show() {}
@@ -37,6 +42,7 @@ void DriWindow::Close() {}
void DriWindow::SetBounds(const gfx::Rect& bounds) {
bounds_ = bounds;
delegate_->OnBoundsChanged(bounds);
+ dri_window_delegate_->OnBoundsChanged(bounds);
}
gfx::Rect DriWindow::GetBounds() {

Powered by Google App Engine
This is Rietveld 408576698