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

Unified Diff: ash/shell.cc

Issue 2901563002: chromeos: adds TouchDeviceServer and wires up in mushrome (Closed)
Patch Set: no temporary Created 3 years, 7 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 | « ash/shell.h ('k') | ash/shell_port.h » ('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 864802ad9feef8bb842d6f78656bb4b725c3c1fb..314024d96d652627116e233e8772c03f145fa547 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -156,6 +156,7 @@
#include "ui/display/manager/chromeos/default_touch_transform_setter.h"
#include "ui/display/manager/chromeos/display_change_observer.h"
#include "ui/display/manager/chromeos/display_configurator.h"
+#include "ui/display/manager/chromeos/touch_transform_setter.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/display/types/native_display_delegate.h"
@@ -326,6 +327,11 @@ void Shell::RegisterPrefs(PrefRegistrySimple* registry) {
NightLightController::RegisterPrefs(registry);
}
+// static
+bool Shell::ShouldEnableSimplifiedDisplayManagement() {
+ return GetAshConfig() != Config::MASH;
+}
+
views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
views::Widget* widget) {
// Use translucent-style window frames for dialogs.
@@ -1057,11 +1063,11 @@ void Shell::Init(const ShellInitParams& init_params) {
// WindowTreeHostManager::InitDisplays()
// since AshTouchTransformController listens on
// WindowTreeHostManager::Observer::OnDisplaysInitialized().
- // TODO(sky): needs to to work for mus too.
- if (config == Config::CLASSIC) {
- touch_transformer_controller_.reset(new AshTouchTransformController(
- display_configurator_.get(), display_manager_.get(),
- base::MakeUnique<display::DefaultTouchTransformSetter>()));
+ if (ShouldEnableSimplifiedDisplayManagement()) {
+ touch_transformer_controller_ =
+ base::MakeUnique<AshTouchTransformController>(
+ display_configurator_.get(), display_manager_.get(),
+ shell_port_->CreateTouchTransformDelegate());
}
keyboard_ui_ = shell_port_->CreateKeyboardUI();
« no previous file with comments | « ash/shell.h ('k') | ash/shell_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698