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

Unified Diff: ui/display/chromeos/output_configurator.cc

Issue 214513006: Add Ozone stub implementations for NativeDisplayDelegate and TouchscreenDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/display/chromeos/output_configurator.cc
diff --git a/ui/display/chromeos/output_configurator.cc b/ui/display/chromeos/output_configurator.cc
index 3233c62e342ce646c7c0bb535fbce5823e85da25..62771319fe2dfc9602ee95e0a41d667727785294 100644
--- a/ui/display/chromeos/output_configurator.cc
+++ b/ui/display/chromeos/output_configurator.cc
@@ -12,8 +12,15 @@
#include "base/time/time.h"
#include "ui/display/chromeos/display_mode.h"
#include "ui/display/chromeos/display_snapshot.h"
+#include "ui/display/chromeos/native_display_delegate.h"
+
+#if defined(USE_OZONE)
+#include "ui/display/chromeos/ozone/native_display_delegate_ozone.h"
+#include "ui/display/chromeos/ozone/touchscreen_delegate_ozone.h"
+#elif defined(USE_X11)
#include "ui/display/chromeos/x11/native_display_delegate_x11.h"
#include "ui/display/chromeos/x11/touchscreen_delegate_x11.h"
+#endif
namespace ui {
@@ -189,12 +196,25 @@ void OutputConfigurator::Init(bool is_panel_fitting_enabled) {
return;
if (!native_display_delegate_) {
+#if defined(USE_OZONE)
+ native_display_delegate_.reset(new NativeDisplayDelegateOzone());
+#elif defined(USE_X11)
native_display_delegate_.reset(new NativeDisplayDelegateX11());
+#else
+ NOTREACHED();
+#endif
native_display_delegate_->AddObserver(this);
}
- if (!touchscreen_delegate_)
+ if (!touchscreen_delegate_) {
+#if defined(USE_OZONE)
+ touchscreen_delegate_.reset(new TouchscreenDelegateOzone());
+#elif defined(USE_X11)
touchscreen_delegate_.reset(new TouchscreenDelegateX11());
+#else
+ NOTREACHED();
+#endif
+ }
}
void OutputConfigurator::ForceInitialConfigure(uint32_t background_color_argb) {

Powered by Google App Engine
This is Rietveld 408576698