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

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

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
Patch Set: Created 4 years, 7 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 | « services/ui/launcher/launcher_app.cc ('k') | services/ui/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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 5 #ifndef SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
6 #define SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 6 #define SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "mojo/common/strong_binding_set.h" 11 #include "mojo/common/strong_binding_set.h"
12 #include "mojo/common/tracing_impl.h" 12 #include "mojo/common/tracing_impl.h"
13 #include "mojo/public/cpp/application/application_delegate.h" 13 #include "mojo/public/cpp/application/application_delegate.h"
14 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h" 14 #include "mojo/services/gfx/composition/interfaces/compositor.mojom.h"
15 #include "mojo/services/ui/views/interfaces/view_manager.mojom.h" 15 #include "mojo/services/ui/views/interfaces/view_manager.mojom.h"
16 #include "services/ui/view_manager/view_registry.h" 16 #include "services/ui/view_manager/view_registry.h"
17 17
18 namespace view_manager { 18 namespace view_manager {
19 19
20 // View manager application entry point. 20 // View manager application entry point.
21 class ViewManagerApp : public mojo::ApplicationDelegate, 21 class ViewManagerApp : public mojo::ApplicationDelegate {
22 public mojo::InterfaceFactory<mojo::ui::ViewManager> {
23 public: 22 public:
24 ViewManagerApp(); 23 ViewManagerApp();
25 ~ViewManagerApp() override; 24 ~ViewManagerApp() override;
26 25
27 private: 26 private:
28 // |ApplicationDelegate|: 27 // |ApplicationDelegate|:
29 void Initialize(mojo::ApplicationImpl* app_impl) override; 28 void Initialize(mojo::ApplicationImpl* app_impl) override;
30 bool ConfigureIncomingConnection( 29 bool ConfigureIncomingConnection(
31 mojo::ApplicationConnection* connection) override; 30 mojo::ApplicationConnection* connection) override;
32 31
33 // |InterfaceFactory<ViewManager>|:
34 void Create(const mojo::ConnectionContext& connection_context,
35 mojo::InterfaceRequest<mojo::ui::ViewManager> request) override;
36
37 void OnCompositorConnectionError(); 32 void OnCompositorConnectionError();
38 void OnAssociateConnectionError(const std::string& url); 33 void OnAssociateConnectionError(const std::string& url);
39 34
40 void Shutdown(); 35 void Shutdown();
41 36
42 mojo::ApplicationImpl* app_impl_; 37 mojo::ApplicationImpl* app_impl_;
43 mojo::TracingImpl tracing_; 38 mojo::TracingImpl tracing_;
44 39
45 mojo::StrongBindingSet<mojo::ui::ViewManager> view_managers_; 40 mojo::StrongBindingSet<mojo::ui::ViewManager> view_managers_;
46 std::unique_ptr<ViewRegistry> registry_; 41 std::unique_ptr<ViewRegistry> registry_;
47 42
48 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp); 43 DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
49 }; 44 };
50 45
51 } // namespace view_manager 46 } // namespace view_manager
52 47
53 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_ 48 #endif // SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
OLDNEW
« no previous file with comments | « services/ui/launcher/launcher_app.cc ('k') | services/ui/view_manager/view_manager_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698