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

Unified Diff: ash/mus/bridge/wm_shell_mus.cc

Issue 2323063003: mash: Port sysui's WallpaperDelegateMus to mojo:ash. (Closed)
Patch Set: Cleanup. Created 4 years, 3 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/mus/bridge/wm_shell_mus.h ('k') | ash/mus/context_menu_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_shell_mus.cc
diff --git a/ash/mus/bridge/wm_shell_mus.cc b/ash/mus/bridge/wm_shell_mus.cc
index 78959a48aad559e9114e08841a787df655b60d2d..af64351cb807cf0694866cc5658ee6527e481108 100644
--- a/ash/mus/bridge/wm_shell_mus.cc
+++ b/ash/mus/bridge/wm_shell_mus.cc
@@ -140,8 +140,7 @@ WmShellMus::WmShellMus(
// TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here.
SetKeyboardUI(KeyboardUI::Create());
- // TODO(msw): Port WallpaperDelegateMus and support this (crbug.com/629605):
- // wallpaper_delegate()->InitializeWallpaper();
+ wallpaper_delegate()->InitializeWallpaper();
}
WmShellMus::~WmShellMus() {
@@ -231,6 +230,26 @@ const display::ManagedDisplayInfo& WmShellMus::GetDisplayInfo(
int64_t display_id) const {
// TODO(mash): implement http://crbug.com/622480.
NOTIMPLEMENTED();
+
+ // Return a stub ManagedDisplayInfo object created from a Display object.
msw 2016/09/09 19:10:04 Let me know if there's a better way to do this at
kylechar 2016/09/09 20:12:35 Hmm, this is probably the wrong thing to do here (
msw 2016/09/09 21:13:08 I uploaded an alternative workaround patch to appe
+ auto info = display_info_map_.find(display_id);
+ if (info != display_info_map_.end())
+ return info->second;
+ for (const display::Display& display :
+ display::Screen::GetScreen()->GetAllDisplays()) {
+ if (display.id() == display_id) {
+ display::ManagedDisplayInfo info(display.id(), "MusDisplay", false);
+ info.SetBounds(display.bounds());
+ info.set_device_scale_factor(display.device_scale_factor());
+ info.SetRotation(display.rotation(),
+ display::Display::ROTATION_SOURCE_UNKNOWN);
+ info.set_touch_support(display.touch_support());
+ info.set_maximum_cursor_size(display.maximum_cursor_size());
+ display_info_map_[display_id] = info;
+ return display_info_map_[display_id];
+ }
+ }
+
static display::ManagedDisplayInfo fake_info;
return fake_info;
}
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/context_menu_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698