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

Unified Diff: ash/common/wallpaper/wallpaper_controller.cc

Issue 2323063003: mash: Port sysui's WallpaperDelegateMus to mojo:ash. (Closed)
Patch Set: Alternative display info workaround. 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 | « no previous file | ash/common/wallpaper/wallpaper_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wallpaper/wallpaper_controller.cc
diff --git a/ash/common/wallpaper/wallpaper_controller.cc b/ash/common/wallpaper/wallpaper_controller.cc
index c0c60279758f9e46f64a779c7b46f2ef4cf05674..76864c6e04b3de1c6a3b1327fbf7f783a713ca59 100644
--- a/ash/common/wallpaper/wallpaper_controller.cc
+++ b/ash/common/wallpaper/wallpaper_controller.cc
@@ -151,8 +151,12 @@ gfx::Size WallpaperController::GetMaxDisplaySizeInNative() {
// Display::size.
// TODO(msw): Avoid using Display::size here; see http://crbug.com/613657.
gfx::Size size = display.size();
- if (shell)
- size = shell->GetDisplayInfo(display.id()).bounds_in_native().size();
+ if (shell) {
+ display::ManagedDisplayInfo info = shell->GetDisplayInfo(display.id());
+ // TODO(mash): Mash returns a fake ManagedDisplayInfo. crbug.com/622480
sky 2016/09/09 22:17:01 Is wallpaper the only place that needs ManagedDisp
msw 2016/09/09 23:09:51 No, many places currently use ManagedDisplayInfo.
sky 2016/09/09 23:36:35 Ok, sounds reasonable to me to address fetching th
+ if (info.id() == display.id())
+ size = info.bounds_in_native().size();
+ }
if (display.rotation() == display::Display::ROTATE_90 ||
display.rotation() == display::Display::ROTATE_270) {
size = gfx::Size(size.height(), size.width());
« no previous file with comments | « no previous file | ash/common/wallpaper/wallpaper_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698