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

Unified Diff: extensions/shell/browser/shell_desktop_controller_aura.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 | « extensions/shell/browser/DEPS ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/shell_desktop_controller_aura.cc
diff --git a/extensions/shell/browser/shell_desktop_controller_aura.cc b/extensions/shell/browser/shell_desktop_controller_aura.cc
index 18474de0b0bb92724449e0979c4c88d8e303eeb8..0abc51ac1368d1cd140451ac7e54aa4fdf3d6338 100644
--- a/extensions/shell/browser/shell_desktop_controller_aura.cc
+++ b/extensions/shell/browser/shell_desktop_controller_aura.cc
@@ -42,8 +42,18 @@
#include "ui/chromeos/user_activity_power_manager_notifier.h"
#include "ui/display/types/display_mode.h"
#include "ui/display/types/display_snapshot.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 extensions {
namespace {
@@ -168,7 +178,13 @@ ShellDesktopControllerAura::ShellDesktopControllerAura()
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
this);
display_configurator_.reset(new ui::DisplayConfigurator);
- display_configurator_->Init(false);
+#if defined(USE_OZONE)
+ display_configurator_->Init(
+ ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(), false);
+#elif defined(USE_X11)
+ display_configurator_->Init(
+ base::WrapUnique(new ui::NativeDisplayDelegateX11()), false);
+#endif
display_configurator_->ForceInitialConfigure(0);
display_configurator_->AddObserver(this);
#endif
« no previous file with comments | « extensions/shell/browser/DEPS ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698