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

Side by Side Diff: services/ui/view_manager/view_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/surface_manager.cc ('k') | services/ui/view_manager/view_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_HOST_IMPL_H_
6 #define SERVICES_UI_VIEW_MANAGER_VIEW_HOST_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/services/ui/views/interfaces/views.mojom.h"
11 #include "services/ui/view_manager/view_registry.h"
12 #include "services/ui/view_manager/view_state.h"
13
14 namespace view_manager {
15
16 // ViewHost interface implementation.
17 // This object is owned by its associated ViewState.
18 class ViewHostImpl : public mojo::ui::ViewHost {
19 public:
20 ViewHostImpl(ViewRegistry* registry,
21 ViewState* state,
22 mojo::InterfaceRequest<mojo::ui::ViewHost> view_host_request);
23 ~ViewHostImpl() override;
24
25 void set_view_host_connection_error_handler(const base::Closure& handler) {
26 binding_.set_connection_error_handler(handler);
27 }
28
29 private:
30 // |ViewHost|:
31 void GetServiceProvider(
32 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider) override;
33 void RequestLayout() override;
34 void AddChild(uint32_t child_key,
35 mojo::ui::ViewTokenPtr child_view_token) override;
36 void RemoveChild(uint32_t child_key) override;
37 void LayoutChild(uint32_t child_key,
38 mojo::ui::ViewLayoutParamsPtr child_layout_params,
39 const LayoutChildCallback& callback) override;
40
41 ViewRegistry* const registry_;
42 ViewState* const state_;
43 mojo::Binding<mojo::ui::ViewHost> binding_;
44
45 DISALLOW_COPY_AND_ASSIGN(ViewHostImpl);
46 };
47
48 } // namespace view_manager
49
50 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « services/ui/view_manager/surface_manager.cc ('k') | services/ui/view_manager/view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698