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

Unified Diff: ash/shell.cc

Issue 1878903002: Use injection and remove ozone dependency from ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unique_ptr Created 4 years, 8 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 | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 6eaa214c586221c3d84d5167f26e4eba598330f4..acffa37ad5d25b8251f543c8cdf33a6dbcd60843 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -144,6 +144,15 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "ui/chromeos/user_activity_power_manager_notifier.h"
#include "ui/display/chromeos/display_configurator.h"
+
+#if defined(USE_X11)
+#include "ui/display/chromeos/x11/native_display_delegate_x11.h"
+#endif
+
+#if defined(USE_OZONE)
+#include "ui/display/types/native_display_delegate.h"
+#include "ui/ozone/public/ozone_platform.h"
+#endif
#endif // defined(OS_CHROMEOS)
namespace ash {
@@ -865,7 +874,16 @@ void Shell::Init(const ShellInitParams& init_params) {
// --ash-host-window-bounds flag.
if (in_mus_)
display_configurator_->set_configure_display(false);
- display_configurator_->Init(!gpu_support_->IsPanelFittingDisabled());
+
+#if defined(USE_OZONE)
+ display_configurator_->Init(
+ ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(),
+ !gpu_support_->IsPanelFittingDisabled());
+#elif defined(USE_X11)
+ display_configurator_->Init(
+ base::WrapUnique(new ui::NativeDisplayDelegateX11()),
+ !gpu_support_->IsPanelFittingDisabled());
+#endif
// The DBusThreadManager must outlive this Shell. See the DCHECK in ~Shell.
chromeos::DBusThreadManager* dbus_thread_manager =
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698