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

Unified Diff: components/mus/example/wm/window_manager_impl.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 2 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/mus/example/wm/window_manager_impl.h ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/example/wm/window_manager_impl.cc
diff --git a/components/mus/example/wm/window_manager_impl.cc b/components/mus/example/wm/window_manager_impl.cc
index 41b29e08bcf26f3c5c4a679167fe061c53d421ae..65681c93ec82b0ff7cb38acecfe5b63cb6715791 100644
--- a/components/mus/example/wm/window_manager_impl.cc
+++ b/components/mus/example/wm/window_manager_impl.cc
@@ -55,3 +55,16 @@ void WindowManagerImpl::CenterWindow(uint32_t view_id, mojo::SizePtr size) {
// TODO(beng):
}
+void WindowManagerImpl::GetDisplays(const GetDisplaysCallback& callback) {
+ mojo::Array<mus::mojom::DisplayPtr> displays(1);
+ displays[0] = mus::mojom::Display::New();
+ displays[0]->id = 2001;
+ displays[0]->bounds = mojo::Rect::New();
+ displays[0]->bounds->y = 0;
+ displays[0]->bounds->width = state_->root()->bounds().width;
+ displays[0]->bounds->height = state_->root()->bounds().width;
+ displays[0]->work_area = displays[0]->bounds.Clone();
+ displays[0]->device_pixel_ratio =
+ state_->root()->viewport_metrics().device_pixel_ratio;
+ callback.Run(displays.Pass());
+}
« no previous file with comments | « components/mus/example/wm/window_manager_impl.h ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698