| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 base::MessageLoop::current()->QuitWhenIdle(); | 175 base::MessageLoop::current()->QuitWhenIdle(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void CatalogViewer::Initialize(shell::Connector* connector, | 178 void CatalogViewer::Initialize(shell::Connector* connector, |
| 179 const shell::Identity& identity, | 179 const shell::Identity& identity, |
| 180 uint32_t id) { | 180 uint32_t id) { |
| 181 connector_ = connector; | 181 connector_ = connector; |
| 182 tracing_.Initialize(connector, identity.name()); | 182 tracing_.Initialize(connector, identity.name()); |
| 183 | 183 |
| 184 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 184 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| 185 views::WindowManagerConnection::Create(connector, identity); | 185 window_manager_connection_ = |
| 186 views::WindowManagerConnection::Create(connector, identity); |
| 186 } | 187 } |
| 187 | 188 |
| 188 bool CatalogViewer::AcceptConnection(shell::Connection* connection) { | 189 bool CatalogViewer::AcceptConnection(shell::Connection* connection) { |
| 189 connection->AddInterface<mojom::Launchable>(this); | 190 connection->AddInterface<mojom::Launchable>(this); |
| 190 return true; | 191 return true; |
| 191 } | 192 } |
| 192 | 193 |
| 193 void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) { | 194 void CatalogViewer::Launch(uint32_t what, mojom::LaunchMode how) { |
| 194 bool reuse = how == mojom::LaunchMode::REUSE || | 195 bool reuse = how == mojom::LaunchMode::REUSE || |
| 195 how == mojom::LaunchMode::DEFAULT; | 196 how == mojom::LaunchMode::DEFAULT; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 207 windows_.push_back(window); | 208 windows_.push_back(window); |
| 208 } | 209 } |
| 209 | 210 |
| 210 void CatalogViewer::Create(shell::Connection* connection, | 211 void CatalogViewer::Create(shell::Connection* connection, |
| 211 mojom::LaunchableRequest request) { | 212 mojom::LaunchableRequest request) { |
| 212 bindings_.AddBinding(this, std::move(request)); | 213 bindings_.AddBinding(this, std::move(request)); |
| 213 } | 214 } |
| 214 | 215 |
| 215 } // namespace catalog_viewer | 216 } // namespace catalog_viewer |
| 216 } // namespace mash | 217 } // namespace mash |
| OLD | NEW |