| 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_WS_SERVER_WINDOW_DELEGATE_H_ | 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ |
| 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ | 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "components/mus/public/interfaces/mus_constants.mojom.h" | 10 #include "components/mus/public/interfaces/mus_constants.mojom.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Returns the root of the window tree to which this |window| is attached. | 29 // Returns the root of the window tree to which this |window| is attached. |
| 30 // Returns null if this window is not attached up through to a root window. | 30 // Returns null if this window is not attached up through to a root window. |
| 31 virtual const ServerWindow* GetRootWindow( | 31 virtual const ServerWindow* GetRootWindow( |
| 32 const ServerWindow* window) const = 0; | 32 const ServerWindow* window) const = 0; |
| 33 | 33 |
| 34 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the | 34 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the |
| 35 // appropriate time, which may be synchronously. | 35 // appropriate time, which may be synchronously. |
| 36 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; | 36 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; |
| 37 | 37 |
| 38 // Used to resolve a reference to a Window by ClientWindowId in submitted | |
| 39 // frames. When the client owning |ancestor| (or the client embedded at | |
| 40 // |ancestor|) submits a frame the frame may referenced child windows. The | |
| 41 // reference is done using an id that is only known to the client. This | |
| 42 // function resolves the id into the appropriate window, or null if a window | |
| 43 // can't be found. | |
| 44 virtual ServerWindow* FindWindowForSurface( | |
| 45 const ServerWindow* ancestor, | |
| 46 mojom::SurfaceType surface_type, | |
| 47 const ClientWindowId& client_window_id) = 0; | |
| 48 | |
| 49 protected: | 38 protected: |
| 50 virtual ~ServerWindowDelegate() {} | 39 virtual ~ServerWindowDelegate() {} |
| 51 }; | 40 }; |
| 52 | 41 |
| 53 } // namespace ws | 42 } // namespace ws |
| 54 | 43 |
| 55 } // namespace mus | 44 } // namespace mus |
| 56 | 45 |
| 57 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ | 46 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ |
| OLD | NEW |