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

Unified Diff: components/exo/wm_helper_ash.cc

Issue 2780623002: exo: Fix multi-display hardware cursor (Closed)
Patch Set: Fix style error 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 | « components/exo/wm_helper_ash.h ('k') | components/exo/wm_helper_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wm_helper_ash.cc
diff --git a/components/exo/wm_helper_ash.cc b/components/exo/wm_helper_ash.cc
index e4b96bfd6ba09d42d6235e93ed9f3eceea341209..23beac2a1e1ec37b86859b4d2f3eded3b1259784 100644
--- a/components/exo/wm_helper_ash.cc
+++ b/components/exo/wm_helper_ash.cc
@@ -51,14 +51,12 @@ WMHelperAsh::~WMHelperAsh() {
////////////////////////////////////////////////////////////////////////////////
// WMHelperAsh, private:
-const display::ManagedDisplayInfo WMHelperAsh::GetDisplayInfo(
+const display::ManagedDisplayInfo& WMHelperAsh::GetDisplayInfo(
int64_t display_id) const {
return ash::Shell::Get()->display_manager()->GetDisplayInfo(display_id);
}
-aura::Window* WMHelperAsh::GetContainer(int container_id) {
- // TODO(domlaskowski): Use target root window once multi-display support lands
- // in ARC. See crbug.com/718627.
+aura::Window* WMHelperAsh::GetPrimaryDisplayContainer(int container_id) {
return ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
container_id);
}
@@ -80,6 +78,15 @@ ui::CursorSetType WMHelperAsh::GetCursorSet() const {
return ash::Shell::Get()->cursor_manager()->GetCursorSet();
}
+const display::Display& WMHelperAsh::GetCursorDisplay() const {
+ // TODO(crbug.com/631103): Mushrome doesn't have a cursor manager yet.
+ if (ash::ShellPort::Get()->GetAshConfig() == ash::Config::MUS) {
+ static const display::Display display;
+ return display;
+ }
+ return ash::Shell::Get()->cursor_manager()->GetDisplay();
+}
+
void WMHelperAsh::AddPreTargetHandler(ui::EventHandler* handler) {
ash::Shell::Get()->AddPreTargetHandler(handler);
}
@@ -126,6 +133,10 @@ void WMHelperAsh::OnCursorSetChanged(ui::CursorSetType cursor_set) {
NotifyCursorSetChanged(cursor_set);
}
+void WMHelperAsh::OnCursorDisplayChanged(const display::Display& display) {
+ NotifyCursorDisplayChanged(display);
+}
+
void WMHelperAsh::OnMaximizeModeStarted() {
NotifyMaximizeModeStarted();
}
« no previous file with comments | « components/exo/wm_helper_ash.h ('k') | components/exo/wm_helper_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698