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

Unified Diff: mojo/services/view_manager/view_manager_init_service_context.h

Issue 400113005: A new WM bootstrap flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 | « mojo/services/view_manager/main.cc ('k') | mojo/services/view_manager/view_manager_init_service_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view_manager_init_service_context.h
diff --git a/mojo/services/view_manager/view_manager_init_service_context.h b/mojo/services/view_manager/view_manager_init_service_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..320620599cc64f7a1f94274dc0612c9328856526
--- /dev/null
+++ b/mojo/services/view_manager/view_manager_init_service_context.h
@@ -0,0 +1,59 @@
+// Copyright 2014 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 MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
+#define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
+
+#include <set>
+
+#include "base/memory/scoped_ptr.h"
+#include "mojo/public/cpp/application/application_connection.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/services/view_manager/root_view_manager_delegate.h"
+#include "mojo/services/view_manager/view_manager_export.h"
+
+namespace mojo {
+namespace view_manager {
+namespace service {
+
+class RootNodeManager;
+class ViewManagerInitServiceImpl;
+
+// State shared between all ViewManagerInitService impls.
+class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceContext
+ : public RootViewManagerDelegate {
+ public:
+ ViewManagerInitServiceContext();
+ virtual ~ViewManagerInitServiceContext();
+
+ void AddConnection(ViewManagerInitServiceImpl* connection);
+ void RemoveConnection(ViewManagerInitServiceImpl* connection);
+
+ void ConfigureIncomingConnection(ApplicationConnection* connection);
+
+ RootNodeManager* root_node_manager() { return root_node_manager_.get(); }
+
+ bool is_tree_host_ready() const { return is_tree_host_ready_; }
+
+ private:
+ typedef std::vector<ViewManagerInitServiceImpl*> Connections;
+
+ // RootViewManagerDelegate overrides:
+ virtual void OnRootViewManagerWindowTreeHostCreated() OVERRIDE;
+
+ void OnNativeViewportDeleted();
+
+ scoped_ptr<RootNodeManager> root_node_manager_;
+ Connections connections_;
+
+ bool is_tree_host_ready_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceContext);
+};
+
+} // namespace service
+} // namespace view_manager
+} // namespace mojo
+
+#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
« no previous file with comments | « mojo/services/view_manager/main.cc ('k') | mojo/services/view_manager/view_manager_init_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698