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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
7
8 #include <set>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "mojo/public/cpp/application/application_connection.h"
12 #include "mojo/public/cpp/application/application_delegate.h"
13 #include "mojo/services/view_manager/root_view_manager_delegate.h"
14 #include "mojo/services/view_manager/view_manager_export.h"
15
16 namespace mojo {
17 namespace view_manager {
18 namespace service {
19
20 class RootNodeManager;
21 class ViewManagerInitServiceImpl;
22
23 // State shared between all ViewManagerInitService impls.
24 class MOJO_VIEW_MANAGER_EXPORT ViewManagerInitServiceContext
25 : public RootViewManagerDelegate {
26 public:
27 ViewManagerInitServiceContext();
28 virtual ~ViewManagerInitServiceContext();
29
30 void AddConnection(ViewManagerInitServiceImpl* connection);
31 void RemoveConnection(ViewManagerInitServiceImpl* connection);
32
33 void ConfigureIncomingConnection(ApplicationConnection* connection);
34
35 RootNodeManager* root_node_manager() { return root_node_manager_.get(); }
36
37 bool is_tree_host_ready() const { return is_tree_host_ready_; }
38
39 private:
40 typedef std::vector<ViewManagerInitServiceImpl*> Connections;
41
42 // RootViewManagerDelegate overrides:
43 virtual void OnRootViewManagerWindowTreeHostCreated() OVERRIDE;
44
45 void OnNativeViewportDeleted();
46
47 scoped_ptr<RootNodeManager> root_node_manager_;
48 Connections connections_;
49
50 bool is_tree_host_ready_;
51
52 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceContext);
53 };
54
55 } // namespace service
56 } // namespace view_manager
57 } // namespace mojo
58
59 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_CONTEXT_H_
OLDNEW
« 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