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

Side by Side Diff: services/ui/view_manager/view_tree_host_impl.h

Issue 1415493003: mozart: Initial commit of the view manager. (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/view_manager/view_state.cc ('k') | services/ui/view_manager/view_tree_host_impl.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_VIEW_MANAGER_VIEW_TREE_HOST_IMPL_H_
6 #define SERVICES_UI_VIEW_MANAGER_VIEW_TREE_HOST_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/services/ui/views/interfaces/view_trees.mojom.h"
11 #include "services/ui/view_manager/view_registry.h"
12 #include "services/ui/view_manager/view_tree_state.h"
13
14 namespace view_manager {
15
16 // ViewTreeHost interface implementation.
17 // This object is owned by its associated ViewTreeState.
18 class ViewTreeHostImpl : public mojo::ui::ViewTreeHost {
19 public:
20 ViewTreeHostImpl(
21 ViewRegistry* registry,
22 ViewTreeState* state,
23 mojo::InterfaceRequest<mojo::ui::ViewTreeHost> view_tree_host_request);
24 ~ViewTreeHostImpl() override;
25
26 void set_view_tree_host_connection_error_handler(
27 const base::Closure& handler) {
28 binding_.set_connection_error_handler(handler);
29 }
30
31 private:
32 // |ViewTreeHost|:
33 void RequestLayout() override;
34 void SetRoot(uint32_t root_key,
35 mojo::ui::ViewTokenPtr root_view_token) override;
36 void ResetRoot() override;
37 void LayoutRoot(mojo::ui::ViewLayoutParamsPtr root_layout_params,
38 const LayoutRootCallback& callback) override;
39
40 ViewRegistry* const registry_;
41 ViewTreeState* const state_;
42 mojo::Binding<mojo::ui::ViewTreeHost> binding_;
43
44 DISALLOW_COPY_AND_ASSIGN(ViewTreeHostImpl);
45 };
46
47 } // namespace view_manager
48
49 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « services/ui/view_manager/view_state.cc ('k') | services/ui/view_manager/view_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698