Chromium Code Reviews| Index: services/ui/launcher/launcher_app.h |
| diff --git a/services/ui/launcher/launcher_app.h b/services/ui/launcher/launcher_app.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d614956a969719fcdc71cd98cfa2892794b6dd23 |
| --- /dev/null |
| +++ b/services/ui/launcher/launcher_app.h |
| @@ -0,0 +1,65 @@ |
| +// Copyright 2015 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 SERVICES_UI_LAUNCHER_LAUNCHER_APP_H_ |
| +#define SERVICES_UI_LAUNCHER_LAUNCHER_APP_H_ |
| + |
| +#include <memory> |
| + |
| +#include "mojo/common/tracing_impl.h" |
| +#include "mojo/public/cpp/application/application_delegate.h" |
| +#include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h" |
| +#include "mojo/services/surfaces/interfaces/display.mojom.h" |
| +#include "mojo/services/ui/views/interfaces/view_provider.mojom.h" |
| + |
| +namespace launcher { |
| + |
| +class LauncherViewTree; |
| + |
| +class LauncherApp : public mojo::ApplicationDelegate, |
| + public mojo::NativeViewportEventDispatcher { |
| + public: |
| + LauncherApp(); |
| + ~LauncherApp() override; |
| + |
| + private: |
| + // |ApplicationDelegate|: |
| + void Initialize(mojo::ApplicationImpl* app) override; |
| + |
| + // |NativeViewportEventDispatcher|: |
| + void OnEvent(mojo::EventPtr event, |
| + const mojo::Callback<void()>& callback) override; |
| + |
| + void InitViewport(); |
| + void OnViewportConnectionError(); |
| + void OnViewportCreated(mojo::ViewportMetricsPtr metrics); |
| + void OnViewportMetricsChanged(mojo::ViewportMetricsPtr metrics); |
| + void RequestUpdatedViewportMetrics(); |
| + |
| + void OnViewManagerConnectionError(); |
| + |
| + void LaunchClient(std::string app_url); |
|
abarth
2015/10/24 06:07:21
const std::string&
|
| + void OnClientConnectionError(); |
| + void OnClientViewCreated(mojo::ui::ViewTokenPtr view_token); |
| + |
| + void UpdateClientView(); |
| + |
| + mojo::ApplicationImpl* app_impl_; |
| + mojo::TracingImpl tracing_; |
| + |
| + mojo::NativeViewportPtr viewport_service_; |
| + mojo::Binding<NativeViewportEventDispatcher> |
| + viewport_event_dispatcher_binding_; |
| + |
| + std::unique_ptr<LauncherViewTree> view_tree_; |
| + |
| + mojo::ui::ViewProviderPtr client_view_provider_; |
| + mojo::ui::ViewTokenPtr client_view_token_; |
|
abarth
2015/10/24 06:07:21
nit: We don't usually use |client_| prefixes for t
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(LauncherApp); |
| +}; |
| + |
| +} // namespace launcher |
| + |
| +#endif // SERVICES_UI_LAUNCHER_LAUNCHER_APP_H_ |