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

Side by Side Diff: components/view_manager/view_manager_app.h

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months 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 | « components/view_manager/view_locator.cc ('k') | components/view_manager/view_manager_app.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 2014 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 COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
7
8 #include <set>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "cc/surfaces/surface_manager.h"
12 #include "components/view_manager/connection_manager_delegate.h"
13 #include "components/view_manager/public/interfaces/gpu.mojom.h"
14 #include "components/view_manager/public/interfaces/view_tree.mojom.h"
15 #include "components/view_manager/public/interfaces/view_tree_host.mojom.h"
16 #include "mojo/application/public/cpp/app_lifetime_helper.h"
17 #include "mojo/application/public/cpp/application_delegate.h"
18 #include "mojo/application/public/cpp/interface_factory.h"
19 #include "mojo/common/tracing_impl.h"
20 #include "mojo/common/weak_binding_set.h"
21
22 namespace gles2 {
23 class GpuState;
24 }
25
26 namespace mojo {
27 class ApplicationImpl;
28 }
29
30 namespace surfaces {
31 class SurfacesScheduler;
32 class SurfacesState;
33 }
34
35 namespace ui {
36 class PlatformEventSource;
37 }
38
39 namespace view_manager {
40
41 class ConnectionManager;
42
43 class ViewManagerApp : public mojo::ApplicationDelegate,
44 public ConnectionManagerDelegate,
45 public mojo::InterfaceFactory<mojo::ViewTreeHostFactory>,
46 public mojo::InterfaceFactory<mojo::Gpu>,
47 public mojo::ViewTreeHostFactory {
48 public:
49 ViewManagerApp();
50 ~ViewManagerApp() override;
51
52 private:
53 // ApplicationDelegate:
54 void Initialize(mojo::ApplicationImpl* app) override;
55 bool ConfigureIncomingConnection(
56 mojo::ApplicationConnection* connection) override;
57
58 // ConnectionManagerDelegate:
59 void OnNoMoreRootConnections() override;
60 ClientConnection* CreateClientConnectionForEmbedAtView(
61 ConnectionManager* connection_manager,
62 mojo::InterfaceRequest<mojo::ViewTree> tree_request,
63 mojo::ConnectionSpecificId creator_id,
64 mojo::URLRequestPtr request,
65 const ViewId& root_id) override;
66 ClientConnection* CreateClientConnectionForEmbedAtView(
67 ConnectionManager* connection_manager,
68 mojo::InterfaceRequest<mojo::ViewTree> tree_request,
69 mojo::ConnectionSpecificId creator_id,
70 const ViewId& root_id,
71 mojo::ViewTreeClientPtr client) override;
72
73 // mojo::InterfaceFactory<mojo::ViewTreeHostFactory>:
74 void Create(
75 mojo::ApplicationConnection* connection,
76 mojo::InterfaceRequest<mojo::ViewTreeHostFactory> request) override;
77
78 // mojo::InterfaceFactory<mojo::Gpu> implementation.
79 void Create(mojo::ApplicationConnection* connection,
80 mojo::InterfaceRequest<mojo::Gpu> request) override;
81
82 // mojo::ViewTreeHostFactory implementation.
83 void CreateViewTreeHost(mojo::InterfaceRequest<mojo::ViewTreeHost> host,
84 mojo::ViewTreeHostClientPtr host_client,
85 mojo::ViewTreeClientPtr tree_client) override;
86
87 mojo::WeakBindingSet<mojo::ViewTreeHostFactory> factory_bindings_;
88 mojo::ApplicationImpl* app_impl_;
89 scoped_ptr<ConnectionManager> connection_manager_;
90 mojo::TracingImpl tracing_;
91 scoped_refptr<gles2::GpuState> gpu_state_;
92 scoped_ptr<ui::PlatformEventSource> event_source_;
93 bool is_headless_;
94
95 // Surfaces
96 scoped_refptr<surfaces::SurfacesState> surfaces_state_;
97
98 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
99 };
100
101 } // namespace view_manager
102
103 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_APP_H_
OLDNEW
« no previous file with comments | « components/view_manager/view_locator.cc ('k') | components/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698