Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: services/ui/launcher/launcher_view_tree.h

Issue 1404423007: mozart: Initial commit of the launcher. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/launcher/launcher_app.cc ('k') | services/ui/launcher/launcher_view_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_LAUNCHER_VIEW_TREE_IMPL_H_
6 #define SERVICES_UI_LAUNCHER_VIEW_TREE_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/application/application_impl.h"
10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "mojo/services/native_viewport/interfaces/native_viewport.mojom.h"
12 #include "mojo/services/surfaces/cpp/surfaces_utils.h"
13 #include "mojo/services/surfaces/interfaces/display.mojom.h"
14 #include "mojo/services/surfaces/interfaces/quads.mojom.h"
15 #include "mojo/services/surfaces/interfaces/surfaces.mojom.h"
16 #include "mojo/services/ui/views/interfaces/view_manager.mojom.h"
17
18 namespace launcher {
19
20 class LauncherViewTree : public mojo::ui::ViewTree {
21 public:
22 LauncherViewTree(mojo::ApplicationImpl* app_impl,
23 mojo::DisplayPtr display,
24 mojo::ViewportMetricsPtr viewport_metrics);
25
26 ~LauncherViewTree() override;
27
28 void SetRoot(mojo::ui::ViewTokenPtr token);
29 void SetViewportMetrics(mojo::ViewportMetricsPtr viewport_metrics);
30 void DispatchEvent(mojo::EventPtr event);
31
32 private:
33 // |ViewTree|:
34 void OnLayout(const OnLayoutCallback& callback) override;
35 void OnRootUnavailable(uint32_t root_key,
36 const OnRootUnavailableCallback& callback) override;
37
38 void OnViewManagerConnectionError();
39 void OnViewTreeRegistered();
40
41 void LayoutRoot();
42 void OnLayoutResult(mojo::ui::ViewLayoutInfoPtr info);
43
44 void ScheduleFrame();
45 void FinishFrame();
46 void OnFrameSubmitted();
47
48 mojo::ui::ViewManagerPtr view_manager_;
49 mojo::DisplayPtr display_;
50 mojo::ViewportMetricsPtr viewport_metrics_;
51 mojo::Binding<mojo::ui::ViewTree> binding_;
52
53 mojo::ui::ViewTreeHostPtr view_tree_host_;
54
55 mojo::ui::ViewTokenPtr root_;
56 uint32_t root_key_;
57 mojo::ui::ViewLayoutInfoPtr root_layout_info_;
58
59 bool frame_scheduled_;
60 bool frame_pending_;
61
62 DISALLOW_COPY_AND_ASSIGN(LauncherViewTree);
63 };
64
65 } // namespace launcher
66
67 #endif // SERVICES_UI_LAUNCHER_VIEW_TREE_IMPL_H_
OLDNEW
« no previous file with comments | « services/ui/launcher/launcher_app.cc ('k') | services/ui/launcher/launcher_view_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698