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

Side by Side Diff: mojo/services/view_manager/root_view_manager.h

Issue 507563002: Removes usage of aura::Window from Node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 3 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "mojo/public/cpp/bindings/callback.h" 12 #include "mojo/public/cpp/bindings/callback.h"
13 #include "mojo/services/view_manager/view_manager_export.h" 13 #include "mojo/services/view_manager/view_manager_export.h"
14 14
15 namespace gfx {
16 class Rect;
17 }
18
15 namespace aura { 19 namespace aura {
16 namespace client { 20 namespace client {
17 class FocusClient; 21 class FocusClient;
18 class WindowTreeClient; 22 class WindowTreeClient;
19 } 23 }
24 class Window;
20 class WindowTreeHost; 25 class WindowTreeHost;
21 } 26 }
22 27
23 namespace gfx { 28 namespace gfx {
24 class Screen; 29 class Screen;
25 } 30 }
26 31
27 namespace mojo { 32 namespace mojo {
28 33
29 class ApplicationConnection; 34 class ApplicationConnection;
30 35
31 namespace service { 36 namespace service {
32 37
38 class Node;
33 class RootNodeManager; 39 class RootNodeManager;
34 class RootViewManagerDelegate; 40 class RootViewManagerDelegate;
35 41
36 // RootViewManager binds the root node to an actual display. 42 // RootViewManager binds the root node to an actual display.
37 class MOJO_VIEW_MANAGER_EXPORT RootViewManager { 43 class MOJO_VIEW_MANAGER_EXPORT RootViewManager {
38 public: 44 public:
39 RootViewManager(ApplicationConnection* app_connection, 45 RootViewManager(ApplicationConnection* app_connection,
40 RootNodeManager* root_node, 46 RootNodeManager* root_node,
41 RootViewManagerDelegate* delegate, 47 RootViewManagerDelegate* delegate,
42 const Callback<void()>& native_viewport_closed_callback); 48 const Callback<void()>& native_viewport_closed_callback);
43 virtual ~RootViewManager(); 49 virtual ~RootViewManager();
44 50
51 // Schedules a paint for the specified region of the specified node.
52 void SchedulePaint(const Node* node, const gfx::Rect& bounds);
53
45 // See description above field for details. 54 // See description above field for details.
46 bool in_setup() const { return in_setup_; } 55 bool in_setup() const { return in_setup_; }
47 56
48 private: 57 private:
58 class RootWindowDelegateImpl;
59
49 void OnCompositorCreated(); 60 void OnCompositorCreated();
50 61
51 RootViewManagerDelegate* delegate_; 62 RootViewManagerDelegate* delegate_;
52 63
53 RootNodeManager* root_node_manager_; 64 RootNodeManager* root_node_manager_;
54 65
55 // Returns true if adding the root node's window to |window_tree_host_|. 66 // Returns true if adding the root node's window to |window_tree_host_|.
56 bool in_setup_; 67 bool in_setup_;
57 68
69 scoped_ptr<RootWindowDelegateImpl> window_delegate_;
70
71 // Owned by its parent aura::Window.
72 aura::Window* root_window_;
73
58 scoped_ptr<gfx::Screen> screen_; 74 scoped_ptr<gfx::Screen> screen_;
59 scoped_ptr<aura::WindowTreeHost> window_tree_host_; 75 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
60 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; 76 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
61 scoped_ptr<aura::client::FocusClient> focus_client_; 77 scoped_ptr<aura::client::FocusClient> focus_client_;
62 78
63 DISALLOW_COPY_AND_ASSIGN(RootViewManager); 79 DISALLOW_COPY_AND_ASSIGN(RootViewManager);
64 }; 80 };
65 81
66 } // namespace service 82 } // namespace service
67 } // namespace mojo 83 } // namespace mojo
68 84
69 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ 85 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/root_node_manager.cc ('k') | mojo/services/view_manager/root_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698