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.
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "mojo/public/cpp/bindings/callback.h"
13 #include "mojo/services/view_manager/view_manager_export.h"
18 class WindowTreeClient;
29 class ApplicationConnection;
33 class RootNodeManager;
34 class RootViewManagerDelegate;
36 // RootViewManager binds the root node to an actual display.
37 class MOJO_VIEW_MANAGER_EXPORT RootViewManager {
39 RootViewManager(ApplicationConnection* app_connection,
40 RootNodeManager* root_node,
41 RootViewManagerDelegate* delegate,
42 const Callback<void()>& native_viewport_closed_callback);
43 virtual ~RootViewManager();
45 // See description above field for details.
46 bool in_setup() const { return in_setup_; }
49 void OnCompositorCreated();
51 RootViewManagerDelegate* delegate_;
53 RootNodeManager* root_node_manager_;
55 // Returns true if adding the root node's window to |window_tree_host_|.
58 scoped_ptr<gfx::Screen> screen_;
59 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
60 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
61 scoped_ptr<aura::client::FocusClient> focus_client_;
63 DISALLOW_COPY_AND_ASSIGN(RootViewManager);
66 } // namespace service
69 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_