| 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 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 bool HasCapture() const; | 203 bool HasCapture() const; |
| 204 void SetCapture(); | 204 void SetCapture(); |
| 205 void ReleaseCapture(); | 205 void ReleaseCapture(); |
| 206 | 206 |
| 207 // Focus. See WindowTreeClient::ClearFocus() to reset focus. | 207 // Focus. See WindowTreeClient::ClearFocus() to reset focus. |
| 208 void SetFocus(); | 208 void SetFocus(); |
| 209 bool HasFocus() const; | 209 bool HasFocus() const; |
| 210 void SetCanFocus(bool can_focus); | 210 void SetCanFocus(bool can_focus); |
| 211 | 211 |
| 212 // Embedding. See window_tree.mojom for details. | 212 // Embedding. See window_tree.mojom for details. |
| 213 void Embed(mus::mojom::WindowTreeClientPtr client); | 213 void Embed(mus::mojom::WindowTreeClientPtr client, uint32_t flags = 0); |
| 214 | 214 |
| 215 // NOTE: callback is run synchronously if Embed() is not allowed on this | 215 // NOTE: callback is run synchronously if Embed() is not allowed on this |
| 216 // Window. | 216 // Window. |
| 217 void Embed(mus::mojom::WindowTreeClientPtr client, | 217 void Embed(mus::mojom::WindowTreeClientPtr client, |
| 218 const EmbedCallback& callback); | 218 const EmbedCallback& callback, |
| 219 uint32_t flags = 0); |
| 219 | 220 |
| 220 // TODO(sky): this API is only applicable to the WindowManager. Move it | 221 // TODO(sky): this API is only applicable to the WindowManager. Move it |
| 221 // to a better place. | 222 // to a better place. |
| 222 void RequestClose(); | 223 void RequestClose(); |
| 223 | 224 |
| 224 // Returns an internal name, set by a client app when it creates a window. | 225 // Returns an internal name, set by a client app when it creates a window. |
| 225 std::string GetName() const; | 226 std::string GetName() const; |
| 226 | 227 |
| 227 protected: | 228 protected: |
| 228 // This class is subclassed only by test classes that provide a public ctor. | 229 // This class is subclassed only by test classes that provide a public ctor. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 }; | 347 }; |
| 347 | 348 |
| 348 std::map<const void*, Value> prop_map_; | 349 std::map<const void*, Value> prop_map_; |
| 349 | 350 |
| 350 DISALLOW_COPY_AND_ASSIGN(Window); | 351 DISALLOW_COPY_AND_ASSIGN(Window); |
| 351 }; | 352 }; |
| 352 | 353 |
| 353 } // namespace mus | 354 } // namespace mus |
| 354 | 355 |
| 355 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 356 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |