Chromium Code Reviews| Index: mash/webtest/webtest.h |
| diff --git a/mash/webtest/webtest.h b/mash/webtest/webtest.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c9734176c1876bf6e34f7914e94ee498ce088022 |
| --- /dev/null |
| +++ b/mash/webtest/webtest.h |
| @@ -0,0 +1,62 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MASH_WEBTEST_WEBTEST_H_ |
| +#define MASH_WEBTEST_WEBTEST_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "mash/public/interfaces/launchable.mojom.h" |
| +#include "mojo/public/cpp/bindings/binding_set.h" |
| +#include "services/shell/public/cpp/shell_client.h" |
| +#include "services/tracing/public/cpp/tracing_impl.h" |
| + |
| +namespace views { |
| +class AuraInit; |
| +class Widget; |
| +} |
| + |
| +namespace mash { |
| +namespace webtest { |
| + |
| +class Webtest |
|
sky
2016/05/16 19:53:01
Add description.
|
| + : public shell::ShellClient, |
| + public mojom::Launchable, |
| + public shell::InterfaceFactory<mojom::Launchable> { |
| + public: |
| + Webtest(); |
| + ~Webtest() override; |
| + |
| + void AddWindow(views::Widget* window); |
| + void RemoveWindow(views::Widget* window); |
| + |
| + private: |
| + // shell::ShellClient: |
| + void Initialize(shell::Connector* connector, |
| + const shell::Identity& identity, |
| + uint32_t id) override; |
| + bool AcceptConnection(shell::Connection* connection) override; |
| + |
| + // mojom::Launchable: |
| + void Launch(uint32_t what, mojom::LaunchMode how) override; |
| + |
| + // shell::InterfaceFactory<mojom::Launchable>: |
| + void Create(shell::Connection* connection, |
| + mojom::LaunchableRequest request) override; |
| + |
| + shell::Connector* connector_ = nullptr; |
| + mojo::BindingSet<mojom::Launchable> bindings_; |
| + std::vector<views::Widget*> windows_; |
| + |
| + mojo::TracingImpl tracing_; |
| + std::unique_ptr<views::AuraInit> aura_init_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(Webtest); |
| +}; |
| + |
| +} // namespace webtest |
| +} // namespace mash |
| + |
| +#endif // MASH_WEBTEST_WEBTEST_H_ |