| Index: services/ui/launcher/launcher_view_tree.h
|
| diff --git a/services/ui/launcher/launcher_view_tree.h b/services/ui/launcher/launcher_view_tree.h
|
| index 58ab563af6b5104c107300510f0b996f6c323254..4c4a3034cb78cf871fb1caff54f07a93345f3a86 100644
|
| --- a/services/ui/launcher/launcher_view_tree.h
|
| +++ b/services/ui/launcher/launcher_view_tree.h
|
| @@ -5,23 +5,24 @@
|
| #ifndef SERVICES_UI_LAUNCHER_VIEW_TREE_IMPL_H_
|
| #define SERVICES_UI_LAUNCHER_VIEW_TREE_IMPL_H_
|
|
|
| +#include "base/callback.h"
|
| #include "base/macros.h"
|
| -#include "mojo/public/cpp/application/application_impl.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| +#include "mojo/services/gfx/composition/interfaces/compositor.mojom.h"
|
| #include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h"
|
| -#include "mojo/services/surfaces/cpp/surfaces_utils.h"
|
| -#include "mojo/services/surfaces/interfaces/display.mojom.h"
|
| -#include "mojo/services/surfaces/interfaces/quads.mojom.h"
|
| -#include "mojo/services/surfaces/interfaces/surfaces.mojom.h"
|
| +#include "mojo/services/ui/input/interfaces/input_dispatcher.mojom.h"
|
| #include "mojo/services/ui/views/interfaces/view_manager.mojom.h"
|
|
|
| namespace launcher {
|
|
|
| -class LauncherViewTree : public mojo::ui::ViewTree {
|
| +class LauncherViewTree : public mojo::ui::ViewTree,
|
| + public mojo::gfx::composition::SceneListener {
|
| public:
|
| - LauncherViewTree(mojo::ApplicationImpl* app_impl,
|
| - mojo::DisplayPtr display,
|
| - mojo::ViewportMetricsPtr viewport_metrics);
|
| + LauncherViewTree(mojo::gfx::composition::Compositor* compositor,
|
| + mojo::ui::ViewManager* view_manager,
|
| + mojo::ContextProviderPtr context_provider,
|
| + mojo::ViewportMetricsPtr viewport_metrics,
|
| + const base::Closure& shutdown_callback);
|
|
|
| ~LauncherViewTree() override;
|
|
|
| @@ -30,35 +31,55 @@ class LauncherViewTree : public mojo::ui::ViewTree {
|
| void DispatchEvent(mojo::EventPtr event);
|
|
|
| private:
|
| + // |SceneListener|:
|
| + void OnResourceUnavailable(
|
| + uint32_t resource_id,
|
| + const OnResourceUnavailableCallback& callback) override;
|
| +
|
| // |ViewTree|:
|
| void OnLayout(const OnLayoutCallback& callback) override;
|
| void OnRootUnavailable(uint32_t root_key,
|
| const OnRootUnavailableCallback& callback) override;
|
|
|
| - void OnViewManagerConnectionError();
|
| - void OnViewTreeRegistered();
|
| + void OnRendererConnectionError();
|
| + void OnSceneConnectionError();
|
| + void OnViewTreeConnectionError();
|
| + void OnInputDispatcherConnectionError();
|
| +
|
| + void OnSceneRegistered(mojo::gfx::composition::SceneTokenPtr scene_token);
|
| + void OnViewTreeRegistered(mojo::ui::ViewTreeTokenPtr view_tree_token);
|
|
|
| void LayoutRoot();
|
| void OnLayoutResult(mojo::ui::ViewLayoutInfoPtr info);
|
|
|
| - void ScheduleFrame();
|
| - void FinishFrame();
|
| - void OnFrameSubmitted();
|
| + void SetRootScene();
|
| +
|
| + void PublishFrame();
|
| +
|
| + void Shutdown();
|
|
|
| - mojo::ui::ViewManagerPtr view_manager_;
|
| - mojo::DisplayPtr display_;
|
| + mojo::gfx::composition::Compositor* compositor_;
|
| + mojo::ui::ViewManager* view_manager_;
|
| +
|
| + mojo::ContextProviderPtr context_provider_;
|
| mojo::ViewportMetricsPtr viewport_metrics_;
|
| - mojo::Binding<mojo::ui::ViewTree> binding_;
|
| + base::Closure shutdown_callback_;
|
| +
|
| + mojo::Binding<mojo::gfx::composition::SceneListener> scene_listener_binding_;
|
| + mojo::Binding<mojo::ui::ViewTree> view_tree_binding_;
|
|
|
| + mojo::gfx::composition::ScenePtr scene_;
|
| + mojo::gfx::composition::SceneTokenPtr scene_token_;
|
| + uint32_t scene_version_ = 1u;
|
| +
|
| + mojo::gfx::composition::RendererPtr renderer_;
|
| mojo::ui::ViewTreeHostPtr view_tree_host_;
|
| + mojo::ui::InputDispatcherPtr input_dispatcher_;
|
|
|
| mojo::ui::ViewTokenPtr root_;
|
| - uint32_t root_key_;
|
| + uint32_t root_key_ = 0u;
|
| mojo::ui::ViewLayoutInfoPtr root_layout_info_;
|
|
|
| - bool frame_scheduled_;
|
| - bool frame_pending_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(LauncherViewTree);
|
| };
|
|
|
|
|