| 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/webtest/webtest.h" | 5 #include "mash/webtest/webtest.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 base::MessageLoop::current()->QuitWhenIdle(); | 147 base::MessageLoop::current()->QuitWhenIdle(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void Webtest::Initialize(shell::Connector* connector, | 150 void Webtest::Initialize(shell::Connector* connector, |
| 151 const shell::Identity& identity, | 151 const shell::Identity& identity, |
| 152 uint32_t id) { | 152 uint32_t id) { |
| 153 connector_ = connector; | 153 connector_ = connector; |
| 154 tracing_.Initialize(connector, identity.name()); | 154 tracing_.Initialize(connector, identity.name()); |
| 155 | 155 |
| 156 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 156 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| 157 views::WindowManagerConnection::Create(connector, identity); | 157 views_mus_ = views::WindowManagerConnection::Create(connector, identity); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool Webtest::AcceptConnection(shell::Connection* connection) { | 160 bool Webtest::AcceptConnection(shell::Connection* connection) { |
| 161 connection->AddInterface<mojom::Launchable>(this); | 161 connection->AddInterface<mojom::Launchable>(this); |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 | 164 |
| 165 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) { | 165 void Webtest::Launch(uint32_t what, mojom::LaunchMode how) { |
| 166 bool reuse = how == mojom::LaunchMode::REUSE || | 166 bool reuse = how == mojom::LaunchMode::REUSE || |
| 167 how == mojom::LaunchMode::DEFAULT; | 167 how == mojom::LaunchMode::DEFAULT; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 185 AddWindow(window); | 185 AddWindow(window); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void Webtest::Create(shell::Connection* connection, | 188 void Webtest::Create(shell::Connection* connection, |
| 189 mojom::LaunchableRequest request) { | 189 mojom::LaunchableRequest request) { |
| 190 bindings_.AddBinding(this, std::move(request)); | 190 bindings_.AddBinding(this, std::move(request)); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace webtest | 193 } // namespace webtest |
| 194 } // namespace mash | 194 } // namespace mash |
| OLD | NEW |