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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/example/wm/window_manager_impl.h" 5 #include "components/mus/example/wm/window_manager_impl.h"
6 6
7 #include "components/mus/example/wm/container.h" 7 #include "components/mus/example/wm/container.h"
8 #include "components/mus/example/wm/window_manager_application.h" 8 #include "components/mus/example/wm/window_manager_application.h"
9 #include "components/mus/public/cpp/types.h" 9 #include "components/mus/public/cpp/types.h"
10 #include "components/mus/public/cpp/view.h" 10 #include "components/mus/public/cpp/view.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 container_view->AddChild(child_view); 48 container_view->AddChild(child_view);
49 child_view->Embed(client.Pass()); 49 child_view->Embed(client.Pass());
50 50
51 state_->IncrementWindowCount(); 51 state_->IncrementWindowCount();
52 } 52 }
53 53
54 void WindowManagerImpl::CenterWindow(uint32_t view_id, mojo::SizePtr size) { 54 void WindowManagerImpl::CenterWindow(uint32_t view_id, mojo::SizePtr size) {
55 // TODO(beng): 55 // TODO(beng):
56 } 56 }
57 57
58 void WindowManagerImpl::GetDisplays(const GetDisplaysCallback& callback) {
59 mojo::Array<mus::mojom::DisplayPtr> displays(1);
60 displays[0] = mus::mojom::Display::New();
61 displays[0]->id = 2001;
62 displays[0]->bounds = mojo::Rect::New();
63 displays[0]->bounds->y = 0;
64 displays[0]->bounds->width = state_->root()->bounds().width;
65 displays[0]->bounds->height = state_->root()->bounds().width;
66 displays[0]->work_area = displays[0]->bounds.Clone();
67 displays[0]->device_pixel_ratio =
68 state_->root()->viewport_metrics().device_pixel_ratio;
69 callback.Run(displays.Pass());
70 }
OLDNEW
« 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