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

Side by Side Diff: components/mus/ws/window_tree_host_impl.h

Issue 1423133003: Routes calls to WM through WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no braces Created 5 years, 1 month 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
« no previous file with comments | « components/mus/ws/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
6 #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/mus/public/cpp/types.h" 10 #include "components/mus/public/cpp/types.h"
(...skipping 22 matching lines...) Expand all
33 public FocusControllerDelegate, 33 public FocusControllerDelegate,
34 public EventDispatcherDelegate { 34 public EventDispatcherDelegate {
35 public: 35 public:
36 // TODO(fsamuel): All these parameters are just plumbing for creating 36 // TODO(fsamuel): All these parameters are just plumbing for creating
37 // DisplayManagers. We should probably just store these common parameters 37 // DisplayManagers. We should probably just store these common parameters
38 // in the DisplayManagerFactory and pass them along on DisplayManager::Create. 38 // in the DisplayManagerFactory and pass them along on DisplayManager::Create.
39 WindowTreeHostImpl(mojom::WindowTreeHostClientPtr client, 39 WindowTreeHostImpl(mojom::WindowTreeHostClientPtr client,
40 ConnectionManager* connection_manager, 40 ConnectionManager* connection_manager,
41 mojo::ApplicationImpl* app_impl, 41 mojo::ApplicationImpl* app_impl,
42 const scoped_refptr<GpuState>& gpu_state, 42 const scoped_refptr<GpuState>& gpu_state,
43 const scoped_refptr<SurfacesState>& surfaces_state); 43 const scoped_refptr<SurfacesState>& surfaces_state,
44 mojom::WindowManagerPtr window_manater);
44 ~WindowTreeHostImpl() override; 45 ~WindowTreeHostImpl() override;
45 46
46 // Initializes state that depends on the existence of a WindowTreeHostImpl. 47 // Initializes state that depends on the existence of a WindowTreeHostImpl.
47 void Init(WindowTreeHostDelegate* delegate); 48 void Init(WindowTreeHostDelegate* delegate);
48 49
49 WindowTreeImpl* GetWindowTree(); 50 WindowTreeImpl* GetWindowTree();
50 51
51 mojom::WindowTreeHostClient* client() const { return client_.get(); } 52 mojom::WindowTreeHostClient* client() const { return client_.get(); }
52 53
53 // Returns whether |window| is a descendant of this root but not itself a 54 // Returns whether |window| is a descendant of this root but not itself a
54 // root window. 55 // root window.
55 bool IsWindowAttachedToRoot(const ServerWindow* window) const; 56 bool IsWindowAttachedToRoot(const ServerWindow* window) const;
56 57
57 // Schedules a paint for the specified region in the coordinates of |window| 58 // Schedules a paint for the specified region in the coordinates of |window|
58 // if 59 // if
59 // the |window| is in this viewport. Returns whether |window| is in the 60 // the |window| is in this viewport. Returns whether |window| is in the
60 // viewport. 61 // viewport.
61 bool SchedulePaintIfInViewport(const ServerWindow* window, 62 bool SchedulePaintIfInViewport(const ServerWindow* window,
62 const gfx::Rect& bounds); 63 const gfx::Rect& bounds);
63 64
64 // Returns the metrics for this viewport. 65 // Returns the metrics for this viewport.
65 const mojom::ViewportMetrics& GetViewportMetrics() const; 66 const mojom::ViewportMetrics& GetViewportMetrics() const;
66 67
67 ConnectionManager* connection_manager() { return connection_manager_; } 68 ConnectionManager* connection_manager() { return connection_manager_; }
68 69
70 mojom::WindowManager* window_manager() { return window_manager_.get(); }
71
69 // Returns the root ServerWindow of this viewport. 72 // Returns the root ServerWindow of this viewport.
70 ServerWindow* root_window() { return root_.get(); } 73 ServerWindow* root_window() { return root_.get(); }
71 const ServerWindow* root_window() const { return root_.get(); } 74 const ServerWindow* root_window() const { return root_.get(); }
72 75
73 void SetFocusedWindow(ServerWindow* window); 76 void SetFocusedWindow(ServerWindow* window);
74 ServerWindow* GetFocusedWindow(); 77 ServerWindow* GetFocusedWindow();
75 void DestroyFocusController(); 78 void DestroyFocusController();
76 79
77 void UpdateTextInputState(ServerWindow* window, 80 void UpdateTextInputState(ServerWindow* window,
78 const ui::TextInputState& state); 81 const ui::TextInputState& state);
(...skipping 30 matching lines...) Expand all
109 void DispatchInputEventToWindow(ServerWindow* target, 112 void DispatchInputEventToWindow(ServerWindow* target,
110 mojo::EventPtr event) override; 113 mojo::EventPtr event) override;
111 114
112 WindowTreeHostDelegate* delegate_; 115 WindowTreeHostDelegate* delegate_;
113 ConnectionManager* const connection_manager_; 116 ConnectionManager* const connection_manager_;
114 mojom::WindowTreeHostClientPtr client_; 117 mojom::WindowTreeHostClientPtr client_;
115 EventDispatcher event_dispatcher_; 118 EventDispatcher event_dispatcher_;
116 scoped_ptr<ServerWindow> root_; 119 scoped_ptr<ServerWindow> root_;
117 scoped_ptr<DisplayManager> display_manager_; 120 scoped_ptr<DisplayManager> display_manager_;
118 scoped_ptr<FocusController> focus_controller_; 121 scoped_ptr<FocusController> focus_controller_;
122 mojom::WindowManagerPtr window_manager_;
119 123
120 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostImpl); 124 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostImpl);
121 }; 125 };
122 126
123 } // namespace ws 127 } // namespace ws
124 } // namespace mus 128 } // namespace mus
125 129
126 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_ 130 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_apptest.cc ('k') | components/mus/ws/window_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698