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

Side by Side Diff: mash/wm/window_manager_application.cc

Issue 1635603002: Make use of CreateInterfacePtrAndBind() where appropriate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks Created 4 years, 11 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 | « mandoline/ui/desktop_ui/browser_window.cc ('k') | media/mojo/services/media_apptest.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 "mash/wm/window_manager_application.h" 5 #include "mash/wm/window_manager_application.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void WindowManagerApplication::Initialize(mojo::ApplicationImpl* app) { 77 void WindowManagerApplication::Initialize(mojo::ApplicationImpl* app) {
78 app_ = app; 78 app_ = app;
79 tracing_.Initialize(app); 79 tracing_.Initialize(app);
80 window_manager_.reset(new WindowManagerImpl()); 80 window_manager_.reset(new WindowManagerImpl());
81 // Don't bind to the WindowManager immediately. Wait for OnEmbed() first. 81 // Don't bind to the WindowManager immediately. Wait for OnEmbed() first.
82 mus::mojom::WindowManagerPtr window_manager; 82 mus::mojom::WindowManagerPtr window_manager;
83 requests_.push_back( 83 requests_.push_back(
84 make_scoped_ptr(new mojo::InterfaceRequest<mus::mojom::WindowManager>( 84 make_scoped_ptr(new mojo::InterfaceRequest<mus::mojom::WindowManager>(
85 mojo::GetProxy(&window_manager)))); 85 mojo::GetProxy(&window_manager))));
86 user_window_controller_.reset(new UserWindowControllerImpl()); 86 user_window_controller_.reset(new UserWindowControllerImpl());
87 mus::mojom::WindowTreeHostClientPtr host_client; 87 mus::CreateSingleWindowTreeHost(
88 host_client_binding_.Bind(GetProxy(&host_client)); 88 app, host_client_binding_.CreateInterfacePtrAndBind(), this,
89 mus::CreateSingleWindowTreeHost(app, std::move(host_client), this, 89 &window_tree_host_, std::move(window_manager), window_manager_.get());
90 &window_tree_host_, std::move(window_manager),
91 window_manager_.get());
92 } 90 }
93 91
94 bool WindowManagerApplication::ConfigureIncomingConnection( 92 bool WindowManagerApplication::ConfigureIncomingConnection(
95 mojo::ApplicationConnection* connection) { 93 mojo::ApplicationConnection* connection) {
96 connection->AddService<mash::wm::mojom::UserWindowController>(this); 94 connection->AddService<mash::wm::mojom::UserWindowController>(this);
97 connection->AddService<mus::mojom::AcceleratorRegistrar>(this); 95 connection->AddService<mus::mojom::AcceleratorRegistrar>(this);
98 connection->AddService<mus::mojom::WindowManager>(this); 96 connection->AddService<mus::mojom::WindowManager>(this);
99 return true; 97 return true;
100 } 98 }
101 99
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 DCHECK_EQ(mus::LoWord(window->id()), container) 218 DCHECK_EQ(mus::LoWord(window->id()), container)
221 << "Containers must be created before other windows!"; 219 << "Containers must be created before other windows!";
222 window->SetBounds(root_->bounds()); 220 window->SetBounds(root_->bounds());
223 window->SetVisible(true); 221 window->SetVisible(true);
224 root_->AddChild(window); 222 root_->AddChild(window);
225 } 223 }
226 } 224 }
227 225
228 } // namespace wm 226 } // namespace wm
229 } // namespace mash 227 } // namespace mash
OLDNEW
« no previous file with comments | « mandoline/ui/desktop_ui/browser_window.cc ('k') | media/mojo/services/media_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698