OLD | NEW |
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 COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
7 | 7 |
8 #include "components/mus/public/cpp/types.h" | 8 #include "components/mus/public/cpp/types.h" |
9 #include "components/mus/public/cpp/window.h" | 9 #include "components/mus/public/cpp/window.h" |
10 #include "components/mus/public/cpp/window_tree_connection.h" | 10 #include "components/mus/public/cpp/window_tree_connection.h" |
11 #include "components/mus/public/interfaces/window_tree.mojom.h" | 11 #include "components/mus/public/interfaces/window_tree.mojom.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
| 15 class Insets; |
15 class Size; | 16 class Size; |
16 } | 17 } |
17 | 18 |
18 namespace mus { | 19 namespace mus { |
19 class WindowTreeConnection; | 20 class WindowTreeConnection; |
20 class WindowTreeDelegate; | 21 class WindowTreeDelegate; |
21 | 22 |
22 // Manages the connection with the Window Server service. | 23 // Manages the connection with the Window Server service. |
23 class WindowTreeClientImpl : public WindowTreeConnection, | 24 class WindowTreeClientImpl : public WindowTreeConnection, |
24 public mus::mojom::WindowTreeClient { | 25 public mus::mojom::WindowTreeClient { |
(...skipping 20 matching lines...) Expand all Loading... |
45 void RemoveChild(Id child_id, Id parent_id); | 46 void RemoveChild(Id child_id, Id parent_id); |
46 | 47 |
47 void Reorder(Id window_id, | 48 void Reorder(Id window_id, |
48 Id relative_window_id, | 49 Id relative_window_id, |
49 mojom::OrderDirection direction); | 50 mojom::OrderDirection direction); |
50 | 51 |
51 // Returns true if the specified window was created by this connection. | 52 // Returns true if the specified window was created by this connection. |
52 bool OwnsWindow(Id id) const; | 53 bool OwnsWindow(Id id) const; |
53 | 54 |
54 void SetBounds(Id window_id, const gfx::Rect& bounds); | 55 void SetBounds(Id window_id, const gfx::Rect& bounds); |
55 void SetClientArea(Id window_id, const gfx::Rect& client_area); | 56 void SetClientArea(Id window_id, const gfx::Insets& client_area); |
56 void SetFocus(Id window_id); | 57 void SetFocus(Id window_id); |
57 void SetVisible(Id window_id, bool visible); | 58 void SetVisible(Id window_id, bool visible); |
58 void SetProperty(Id window_id, | 59 void SetProperty(Id window_id, |
59 const std::string& name, | 60 const std::string& name, |
60 const std::vector<uint8_t>& data); | 61 const std::vector<uint8_t>& data); |
61 void SetWindowTextInputState(Id window_id, mojo::TextInputStatePtr state); | 62 void SetWindowTextInputState(Id window_id, mojo::TextInputStatePtr state); |
62 void SetImeVisibility(Id window_id, | 63 void SetImeVisibility(Id window_id, |
63 bool visible, | 64 bool visible, |
64 mojo::TextInputStatePtr state); | 65 mojo::TextInputStatePtr state); |
65 | 66 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 mojom::WindowDataPtr root, | 117 mojom::WindowDataPtr root, |
117 mojom::WindowTreePtr tree, | 118 mojom::WindowTreePtr tree, |
118 Id focused_window_id, | 119 Id focused_window_id, |
119 uint32_t access_policy) override; | 120 uint32_t access_policy) override; |
120 void OnEmbeddedAppDisconnected(Id window_id) override; | 121 void OnEmbeddedAppDisconnected(Id window_id) override; |
121 void OnUnembed() override; | 122 void OnUnembed() override; |
122 void OnWindowBoundsChanged(Id window_id, | 123 void OnWindowBoundsChanged(Id window_id, |
123 mojo::RectPtr old_bounds, | 124 mojo::RectPtr old_bounds, |
124 mojo::RectPtr new_bounds) override; | 125 mojo::RectPtr new_bounds) override; |
125 void OnClientAreaChanged(uint32_t window_id, | 126 void OnClientAreaChanged(uint32_t window_id, |
126 mojo::RectPtr old_client_area, | 127 mojo::InsetsPtr old_client_area, |
127 mojo::RectPtr new_client_area) override; | 128 mojo::InsetsPtr new_client_area) override; |
128 void OnWindowViewportMetricsChanged( | 129 void OnWindowViewportMetricsChanged( |
129 mojom::ViewportMetricsPtr old_metrics, | 130 mojom::ViewportMetricsPtr old_metrics, |
130 mojom::ViewportMetricsPtr new_metrics) override; | 131 mojom::ViewportMetricsPtr new_metrics) override; |
131 void OnWindowHierarchyChanged( | 132 void OnWindowHierarchyChanged( |
132 Id window_id, | 133 Id window_id, |
133 Id new_parent_id, | 134 Id new_parent_id, |
134 Id old_parent_id, | 135 Id old_parent_id, |
135 mojo::Array<mojom::WindowDataPtr> windows) override; | 136 mojo::Array<mojom::WindowDataPtr> windows) override; |
136 void OnWindowReordered(Id window_id, | 137 void OnWindowReordered(Id window_id, |
137 Id relative_window_id, | 138 Id relative_window_id, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 bool is_embed_root_; | 175 bool is_embed_root_; |
175 | 176 |
176 bool in_destructor_; | 177 bool in_destructor_; |
177 | 178 |
178 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); | 179 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); |
179 }; | 180 }; |
180 | 181 |
181 } // namespace mus | 182 } // namespace mus |
182 | 183 |
183 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 184 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
OLD | NEW |