| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 219 |
| 220 // TODO(sky): this API is only applicable to the WindowManager. Move it | 220 // TODO(sky): this API is only applicable to the WindowManager. Move it |
| 221 // to a better place. | 221 // to a better place. |
| 222 void RequestClose(); | 222 void RequestClose(); |
| 223 | 223 |
| 224 // Tells the window manager to take control of moving the window. Locally, |
| 225 // this spins up a nested message loop to handle all further ui messages; we |
| 226 // don't use mojo's built in sync messages because we explicitly want to |
| 227 // process all other messages. Returns true if the move wasn't canceled. |
| 228 bool PerformWindowMove(const gfx::Point& cursor_location); |
| 229 |
| 230 // Tells the window manager to abort any current move initiated by |
| 231 // PerformWindowMove(). |
| 232 void CancelWindowMove(); |
| 233 |
| 224 // Returns an internal name, set by a client app when it creates a window. | 234 // Returns an internal name, set by a client app when it creates a window. |
| 225 std::string GetName() const; | 235 std::string GetName() const; |
| 226 | 236 |
| 227 protected: | 237 protected: |
| 228 // This class is subclassed only by test classes that provide a public ctor. | 238 // This class is subclassed only by test classes that provide a public ctor. |
| 229 Window(); | 239 Window(); |
| 230 ~Window(); | 240 ~Window(); |
| 231 | 241 |
| 232 private: | 242 private: |
| 233 friend class WindowPrivate; | 243 friend class WindowPrivate; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 }; | 356 }; |
| 347 | 357 |
| 348 std::map<const void*, Value> prop_map_; | 358 std::map<const void*, Value> prop_map_; |
| 349 | 359 |
| 350 DISALLOW_COPY_AND_ASSIGN(Window); | 360 DISALLOW_COPY_AND_ASSIGN(Window); |
| 351 }; | 361 }; |
| 352 | 362 |
| 353 } // namespace mus | 363 } // namespace mus |
| 354 | 364 |
| 355 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 365 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |