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

Unified Diff: mash/wm/window_manager_impl.cc

Issue 1474543002: Makes NewWindow() take set of properties for window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke shadow_style changes Created 5 years, 1 month 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 | « mash/wm/window_manager_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/window_manager_impl.cc
diff --git a/mash/wm/window_manager_impl.cc b/mash/wm/window_manager_impl.cc
index 46919aa730b99f1cde0250ababc68172effef929..707807772a93edfdedc408ddf79655cdea5d7f6c 100644
--- a/mash/wm/window_manager_impl.cc
+++ b/mash/wm/window_manager_impl.cc
@@ -64,16 +64,14 @@ gfx::Rect WindowManagerImpl::GetMaximizedWindowBounds() const {
void WindowManagerImpl::OpenWindow(
mus::mojom::WindowTreeClientPtr client,
- mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) {
+ mojo::Map<mojo::String, mojo::Array<uint8_t>> transport_properties) {
mus::Window* root = state_->root();
DCHECK(root);
- mus::Window* child_window = root->connection()->NewWindow();
- // TODO(beng): mus::Window should have a "SetSharedProperties" method that
- // joins the supplied map onto the internal one.
- for (auto prop : properties)
- child_window->SetSharedProperty(prop.GetKey(), prop.GetValue());
-
+ mus::Window::SharedProperties properties =
+ transport_properties.To<mus::Window::SharedProperties>();
+ // TODO(sky): constrain to valid properties here.
+ mus::Window* child_window = root->connection()->NewWindow(&properties);
child_window->SetBounds(CalculateDefaultBounds(child_window));
GetContainerForChild(child_window)->AddChild(child_window);
child_window->Embed(client.Pass());
« no previous file with comments | « mash/wm/window_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698