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

Side by Side Diff: mash/quick_launch/quick_launch.cc

Issue 2471033005: Adds DesktopWindowTreeHostMus (Closed)
Patch Set: fix Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/quick_launch/quick_launch.h" 5 #include "mash/quick_launch/quick_launch.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
12 #include "mash/public/interfaces/launchable.mojom.h" 13 #include "mash/public/interfaces/launchable.mojom.h"
13 #include "services/catalog/public/interfaces/catalog.mojom.h" 14 #include "services/catalog/public/interfaces/catalog.mojom.h"
14 #include "services/service_manager/public/c/main.h" 15 #include "services/service_manager/public/c/main.h"
15 #include "services/service_manager/public/cpp/connector.h" 16 #include "services/service_manager/public/cpp/connector.h"
16 #include "services/service_manager/public/cpp/service.h" 17 #include "services/service_manager/public/cpp/service.h"
17 #include "services/service_manager/public/cpp/service_runner.h" 18 #include "services/service_manager/public/cpp/service_runner.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 auto it = std::find(windows_.begin(), windows_.end(), window); 160 auto it = std::find(windows_.begin(), windows_.end(), window);
160 DCHECK(it != windows_.end()); 161 DCHECK(it != windows_.end());
161 windows_.erase(it); 162 windows_.erase(it);
162 if (windows_.empty() && base::MessageLoop::current()->is_running()) 163 if (windows_.empty() && base::MessageLoop::current()->is_running())
163 base::MessageLoop::current()->QuitWhenIdle(); 164 base::MessageLoop::current()->QuitWhenIdle();
164 } 165 }
165 166
166 void QuickLaunch::OnStart(const service_manager::ServiceInfo& info) { 167 void QuickLaunch::OnStart(const service_manager::ServiceInfo& info) {
167 tracing_.Initialize(connector(), info.identity.name()); 168 tracing_.Initialize(connector(), info.identity.name());
168 169
169 aura_init_.reset( 170 aura_init_ = base::MakeUnique<views::AuraInit>(connector(), info.identity,
170 new views::AuraInit(connector(), "views_mus_resources.pak")); 171 "views_mus_resources.pak");
171 window_manager_connection_ = 172 window_manager_connection_ =
172 views::WindowManagerConnection::Create(connector(), info.identity); 173 views::WindowManagerConnection::Create(connector(), info.identity);
173 174
174 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW); 175 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW);
175 } 176 }
176 177
177 bool QuickLaunch::OnConnect(const service_manager::ServiceInfo& remote_info, 178 bool QuickLaunch::OnConnect(const service_manager::ServiceInfo& remote_info,
178 service_manager::InterfaceRegistry* registry) { 179 service_manager::InterfaceRegistry* registry) {
179 registry->AddInterface<mojom::Launchable>(this); 180 registry->AddInterface<mojom::Launchable>(this);
180 return true; 181 return true;
(...skipping 16 matching lines...) Expand all
197 windows_.push_back(window); 198 windows_.push_back(window);
198 } 199 }
199 200
200 void QuickLaunch::Create(const service_manager::Identity& remote_identity, 201 void QuickLaunch::Create(const service_manager::Identity& remote_identity,
201 mojom::LaunchableRequest request) { 202 mojom::LaunchableRequest request) {
202 bindings_.AddBinding(this, std::move(request)); 203 bindings_.AddBinding(this, std::move(request));
203 } 204 }
204 205
205 } // namespace quick_launch 206 } // namespace quick_launch
206 } // namespace mash 207 } // namespace mash
OLDNEW
« no previous file with comments | « mash/login/login.cc ('k') | mash/screenlock/screenlock.cc » ('j') | ui/views/mus/aura_init.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698