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

Unified Diff: services/ui/view_manager/view_manager_app.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, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/view_manager/view_layout_request.cc ('k') | services/ui/view_manager/view_manager_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/view_manager/view_manager_app.h
diff --git a/services/ui/view_manager/view_manager_app.h b/services/ui/view_manager/view_manager_app.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca37dea758e3d9f53f54b3e5474758bd41ceae45
--- /dev/null
+++ b/services/ui/view_manager/view_manager_app.h
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
+#define SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "mojo/common/strong_binding_set.h"
+#include "mojo/common/tracing_impl.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/services/ui/views/interfaces/view_manager.mojom.h"
+#include "services/ui/view_manager/surface_manager.h"
+#include "services/ui/view_manager/view_registry.h"
+
+namespace view_manager {
+
+// View manager application entry point.
+class ViewManagerApp : public mojo::ApplicationDelegate,
+ public mojo::InterfaceFactory<mojo::ui::ViewManager> {
+ public:
+ ViewManagerApp();
+ ~ViewManagerApp() override;
+
+ private:
+ // |ApplicationDelegate|:
+ void Initialize(mojo::ApplicationImpl* app_impl) override;
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // |InterfaceFactory<ViewManager>|:
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::ui::ViewManager> request) override;
+
+ mojo::ApplicationImpl* app_impl_;
+ mojo::TracingImpl tracing_;
+
+ mojo::StrongBindingSet<mojo::ui::ViewManager> view_managers;
+ std::unique_ptr<ViewRegistry> registry_;
+ std::unique_ptr<SurfaceManager> surface_manager_; // must come after registry
+
+ DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
+};
+
+} // namespace view_manager
+
+#endif // SERVICES_UI_VIEW_MANAGER_VIEW_MANAGER_APP_H_
« no previous file with comments | « services/ui/view_manager/view_layout_request.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