| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 mojom::WindowDataPtr root, | 113 mojom::WindowDataPtr root, |
| 113 mojom::WindowTreePtr tree, | 114 mojom::WindowTreePtr tree, |
| 114 Id focused_window_id, | 115 Id focused_window_id, |
| 115 uint32_t access_policy) override; | 116 uint32_t access_policy) override; |
| 116 void OnEmbeddedAppDisconnected(Id window_id) override; | 117 void OnEmbeddedAppDisconnected(Id window_id) override; |
| 117 void OnUnembed() override; | 118 void OnUnembed() override; |
| 118 void OnWindowBoundsChanged(Id window_id, | 119 void OnWindowBoundsChanged(Id window_id, |
| 119 mojo::RectPtr old_bounds, | 120 mojo::RectPtr old_bounds, |
| 120 mojo::RectPtr new_bounds) override; | 121 mojo::RectPtr new_bounds) override; |
| 121 void OnClientAreaChanged(uint32_t window_id, | 122 void OnClientAreaChanged(uint32_t window_id, |
| 122 mojo::RectPtr old_client_area, | 123 mojo::InsetsPtr old_client_area, |
| 123 mojo::RectPtr new_client_area) override; | 124 mojo::InsetsPtr new_client_area) override; |
| 124 void OnWindowViewportMetricsChanged( | 125 void OnWindowViewportMetricsChanged( |
| 125 mojom::ViewportMetricsPtr old_metrics, | 126 mojom::ViewportMetricsPtr old_metrics, |
| 126 mojom::ViewportMetricsPtr new_metrics) override; | 127 mojom::ViewportMetricsPtr new_metrics) override; |
| 127 void OnWindowHierarchyChanged( | 128 void OnWindowHierarchyChanged( |
| 128 Id window_id, | 129 Id window_id, |
| 129 Id new_parent_id, | 130 Id new_parent_id, |
| 130 Id old_parent_id, | 131 Id old_parent_id, |
| 131 mojo::Array<mojom::WindowDataPtr> windows) override; | 132 mojo::Array<mojom::WindowDataPtr> windows) override; |
| 132 void OnWindowReordered(Id window_id, | 133 void OnWindowReordered(Id window_id, |
| 133 Id relative_window_id, | 134 Id relative_window_id, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 bool is_embed_root_; | 171 bool is_embed_root_; |
| 171 | 172 |
| 172 bool in_destructor_; | 173 bool in_destructor_; |
| 173 | 174 |
| 174 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); | 175 MOJO_DISALLOW_COPY_AND_ASSIGN(WindowTreeClientImpl); |
| 175 }; | 176 }; |
| 176 | 177 |
| 177 } // namespace mus | 178 } // namespace mus |
| 178 | 179 |
| 179 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ | 180 #endif // COMPONENTS_MUS_PUBLIC_CPP_LIB_WINDOW_TREE_CLIENT_IMPL_H_ |
| OLD | NEW |