OLD | NEW |
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/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 tracing_.Initialize(context()->connector(), context()->identity().name()); | 173 tracing_.Initialize(context()->connector(), context()->identity().name()); |
174 | 174 |
175 aura_init_ = base::MakeUnique<views::AuraInit>( | 175 aura_init_ = base::MakeUnique<views::AuraInit>( |
176 context()->connector(), context()->identity(), "views_mus_resources.pak", | 176 context()->connector(), context()->identity(), "views_mus_resources.pak", |
177 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); | 177 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); |
178 | 178 |
179 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW); | 179 Launch(mojom::kWindow, mojom::LaunchMode::MAKE_NEW); |
180 } | 180 } |
181 | 181 |
182 void QuickLaunch::OnBindInterface( | 182 void QuickLaunch::OnBindInterface( |
183 const service_manager::ServiceInfo& source_info, | 183 const service_manager::BindSourceInfo& source_info, |
184 const std::string& interface_name, | 184 const std::string& interface_name, |
185 mojo::ScopedMessagePipeHandle interface_pipe) { | 185 mojo::ScopedMessagePipeHandle interface_pipe) { |
186 registry_.BindInterface(source_info.identity, interface_name, | 186 registry_.BindInterface(source_info.identity, interface_name, |
187 std::move(interface_pipe)); | 187 std::move(interface_pipe)); |
188 } | 188 } |
189 | 189 |
190 void QuickLaunch::Launch(uint32_t what, mojom::LaunchMode how) { | 190 void QuickLaunch::Launch(uint32_t what, mojom::LaunchMode how) { |
191 bool reuse = how == mojom::LaunchMode::REUSE || | 191 bool reuse = how == mojom::LaunchMode::REUSE || |
192 how == mojom::LaunchMode::DEFAULT; | 192 how == mojom::LaunchMode::DEFAULT; |
193 if (reuse && !windows_.empty()) { | 193 if (reuse && !windows_.empty()) { |
(...skipping 11 matching lines...) Expand all Loading... |
205 windows_.push_back(window); | 205 windows_.push_back(window); |
206 } | 206 } |
207 | 207 |
208 void QuickLaunch::Create(const service_manager::Identity& remote_identity, | 208 void QuickLaunch::Create(const service_manager::Identity& remote_identity, |
209 ::mash::mojom::LaunchableRequest request) { | 209 ::mash::mojom::LaunchableRequest request) { |
210 bindings_.AddBinding(this, std::move(request)); | 210 bindings_.AddBinding(this, std::move(request)); |
211 } | 211 } |
212 | 212 |
213 } // namespace quick_launch | 213 } // namespace quick_launch |
214 } // namespace mash | 214 } // namespace mash |
OLD | NEW |