| 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/catalog_viewer/catalog_viewer.h" | 5 #include "mash/catalog_viewer/catalog_viewer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 void CatalogViewer::OnStart() { | 221 void CatalogViewer::OnStart() { |
| 222 tracing_.Initialize(context()->connector(), context()->identity().name()); | 222 tracing_.Initialize(context()->connector(), context()->identity().name()); |
| 223 | 223 |
| 224 aura_init_ = base::MakeUnique<views::AuraInit>( | 224 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 225 context()->connector(), context()->identity(), "views_mus_resources.pak", | 225 context()->connector(), context()->identity(), "views_mus_resources.pak", |
| 226 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); | 226 std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); |
| 227 } | 227 } |
| 228 | 228 |
| 229 void CatalogViewer::OnBindInterface( | 229 void CatalogViewer::OnBindInterface( |
| 230 const service_manager::ServiceInfo& source_info, | 230 const service_manager::BindSourceInfo& source_info, |
| 231 const std::string& interface_name, | 231 const std::string& interface_name, |
| 232 mojo::ScopedMessagePipeHandle interface_pipe) { | 232 mojo::ScopedMessagePipeHandle interface_pipe) { |
| 233 registry_.BindInterface(source_info.identity, interface_name, | 233 registry_.BindInterface(source_info.identity, interface_name, |
| 234 std::move(interface_pipe)); | 234 std::move(interface_pipe)); |
| 235 } | 235 } |
| 236 | 236 |
| 237 void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) { | 237 void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) { |
| 238 bool reuse = how == mojom::LaunchMode::REUSE || | 238 bool reuse = how == mojom::LaunchMode::REUSE || |
| 239 how == mojom::LaunchMode::DEFAULT; | 239 how == mojom::LaunchMode::DEFAULT; |
| 240 if (reuse && !windows_.empty()) { | 240 if (reuse && !windows_.empty()) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 251 windows_.push_back(window); | 251 windows_.push_back(window); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void CatalogViewer::Create(const service_manager::Identity& remote_identity, | 254 void CatalogViewer::Create(const service_manager::Identity& remote_identity, |
| 255 mojom::LaunchableRequest request) { | 255 mojom::LaunchableRequest request) { |
| 256 bindings_.AddBinding(this, std::move(request)); | 256 bindings_.AddBinding(this, std::move(request)); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace catalog_viewer | 259 } // namespace catalog_viewer |
| 260 } // namespace mash | 260 } // namespace mash |
| OLD | NEW |