| 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_WINDOW_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "components/mus/public/cpp/types.h" | 13 #include "components/mus/public/cpp/types.h" |
| 14 #include "components/mus/public/interfaces/mus_constants.mojom.h" | 14 #include "components/mus/public/interfaces/mus_constants.mojom.h" |
| 15 #include "components/mus/public/interfaces/surface_id.mojom.h" | 15 #include "components/mus/public/interfaces/surface_id.mojom.h" |
| 16 #include "components/mus/public/interfaces/window_tree.mojom.h" | 16 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 17 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 17 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
| 18 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" | 18 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" |
| 19 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" | 19 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" |
| 20 #include "ui/mojo/geometry/geometry.mojom.h" | 20 #include "ui/mojo/geometry/geometry.mojom.h" |
| 21 | 21 |
| 22 namespace gfx { |
| 23 class Rect; |
| 24 class Size; |
| 25 } |
| 26 |
| 22 namespace mus { | 27 namespace mus { |
| 23 | 28 |
| 24 class ServiceProviderImpl; | 29 class ServiceProviderImpl; |
| 25 class WindowObserver; | 30 class WindowObserver; |
| 26 class WindowSurface; | 31 class WindowSurface; |
| 27 class WindowTreeConnection; | 32 class WindowTreeConnection; |
| 28 | 33 |
| 29 // Defined in window_property.h (which we do not include) | 34 // Defined in window_property.h (which we do not include) |
| 30 template <typename T> | 35 template <typename T> |
| 31 struct WindowProperty; | 36 struct WindowProperty; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void MoveToFront(); | 145 void MoveToFront(); |
| 141 void MoveToBack(); | 146 void MoveToBack(); |
| 142 | 147 |
| 143 bool Contains(Window* child) const; | 148 bool Contains(Window* child) const; |
| 144 | 149 |
| 145 Window* GetChildById(Id id); | 150 Window* GetChildById(Id id); |
| 146 | 151 |
| 147 void SetTextInputState(mojo::TextInputStatePtr state); | 152 void SetTextInputState(mojo::TextInputStatePtr state); |
| 148 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state); | 153 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state); |
| 149 | 154 |
| 155 // The following make their way to the WindowManager. See |
| 156 // window_manager.mojom for details. |
| 157 void SetPreferredSize(const gfx::Size& size); |
| 158 void RequestBoundsChange(const gfx::Rect& bounds); |
| 159 void SetShowState(mojom::ShowState show_state); |
| 160 |
| 150 // Focus. | 161 // Focus. |
| 151 void SetFocus(); | 162 void SetFocus(); |
| 152 bool HasFocus() const; | 163 bool HasFocus() const; |
| 153 | 164 |
| 154 // Embedding. See window_tree.mojom for details. | 165 // Embedding. See window_tree.mojom for details. |
| 155 void Embed(mus::mojom::WindowTreeClientPtr client); | 166 void Embed(mus::mojom::WindowTreeClientPtr client); |
| 156 | 167 |
| 157 // NOTE: callback is run synchronously if Embed() is not allowed on this | 168 // NOTE: callback is run synchronously if Embed() is not allowed on this |
| 158 // Window. | 169 // Window. |
| 159 void Embed(mus::mojom::WindowTreeClientPtr client, | 170 void Embed(mus::mojom::WindowTreeClientPtr client, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 }; | 257 }; |
| 247 | 258 |
| 248 std::map<const void*, Value> prop_map_; | 259 std::map<const void*, Value> prop_map_; |
| 249 | 260 |
| 250 MOJO_DISALLOW_COPY_AND_ASSIGN(Window); | 261 MOJO_DISALLOW_COPY_AND_ASSIGN(Window); |
| 251 }; | 262 }; |
| 252 | 263 |
| 253 } // namespace mus | 264 } // namespace mus |
| 254 | 265 |
| 255 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 266 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |