| OLD | NEW |
| (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_ROOT_VIEW_MANAGER_H_ | |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 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" | |
| 14 | |
| 15 namespace gfx { | |
| 16 class Rect; | |
| 17 } | |
| 18 | |
| 19 namespace aura { | |
| 20 namespace client { | |
| 21 class FocusClient; | |
| 22 class WindowTreeClient; | |
| 23 } | |
| 24 class Window; | |
| 25 class WindowTreeHost; | |
| 26 } | |
| 27 | |
| 28 namespace gfx { | |
| 29 class Screen; | |
| 30 } | |
| 31 | |
| 32 namespace mojo { | |
| 33 | |
| 34 class ApplicationConnection; | |
| 35 | |
| 36 namespace service { | |
| 37 | |
| 38 class Node; | |
| 39 class RootNodeManager; | |
| 40 class RootViewManagerDelegate; | |
| 41 | |
| 42 // RootViewManager binds the root node to an actual display. | |
| 43 class MOJO_VIEW_MANAGER_EXPORT RootViewManager { | |
| 44 public: | |
| 45 RootViewManager(ApplicationConnection* app_connection, | |
| 46 RootNodeManager* root_node, | |
| 47 RootViewManagerDelegate* delegate, | |
| 48 const Callback<void()>& native_viewport_closed_callback); | |
| 49 virtual ~RootViewManager(); | |
| 50 | |
| 51 // Schedules a paint for the specified region of the specified node. | |
| 52 void SchedulePaint(const Node* node, const gfx::Rect& bounds); | |
| 53 | |
| 54 // See description above field for details. | |
| 55 bool in_setup() const { return in_setup_; } | |
| 56 | |
| 57 private: | |
| 58 class RootWindowDelegateImpl; | |
| 59 | |
| 60 void OnCompositorCreated(); | |
| 61 | |
| 62 RootViewManagerDelegate* delegate_; | |
| 63 | |
| 64 RootNodeManager* root_node_manager_; | |
| 65 | |
| 66 // Returns true if adding the root node's window to |window_tree_host_|. | |
| 67 bool in_setup_; | |
| 68 | |
| 69 scoped_ptr<RootWindowDelegateImpl> window_delegate_; | |
| 70 | |
| 71 // Owned by its parent aura::Window. | |
| 72 aura::Window* root_window_; | |
| 73 | |
| 74 scoped_ptr<gfx::Screen> screen_; | |
| 75 scoped_ptr<aura::WindowTreeHost> window_tree_host_; | |
| 76 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; | |
| 77 scoped_ptr<aura::client::FocusClient> focus_client_; | |
| 78 | |
| 79 DISALLOW_COPY_AND_ASSIGN(RootViewManager); | |
| 80 }; | |
| 81 | |
| 82 } // namespace service | |
| 83 } // namespace mojo | |
| 84 | |
| 85 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ | |
| OLD | NEW |