| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/mus/public/interfaces/mus_constants.mojom.h" | 9 #include "components/mus/public/interfaces/mus_constants.mojom.h" |
| 10 #include "components/mus/public/interfaces/window_tree.mojom.h" | 10 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 11 | 11 |
| 12 namespace mus { | 12 namespace mus { |
| 13 | 13 |
| 14 class SurfacesState; | 14 class SurfacesState; |
| 15 | 15 |
| 16 namespace ws { | 16 namespace ws { |
| 17 | 17 |
| 18 struct ClientWindowId; | 18 struct ClientWindowId; |
| 19 class ServerWindow; | 19 class ServerWindow; |
| 20 struct WindowId; | 20 struct WindowId; |
| 21 | 21 |
| 22 class ServerWindowDelegate { | 22 class ServerWindowDelegate { |
| 23 public: | 23 public: |
| 24 virtual SurfacesState* GetSurfacesState() = 0; | 24 virtual SurfacesState* GetSurfacesState() = 0; |
| 25 | 25 |
| 26 virtual void OnScheduleWindowPaint(const ServerWindow* window) = 0; | 26 virtual void OnScheduleWindowPaint(ServerWindow* window) = 0; |
| 27 | 27 |
| 28 // Returns the root of the window tree to which this |window| is attached. | 28 // Returns the root of the window tree to which this |window| is attached. |
| 29 // Returns null if this window is not attached up through to a root window. | 29 // Returns null if this window is not attached up through to a root window. |
| 30 virtual const ServerWindow* GetRootWindow( | 30 virtual const ServerWindow* GetRootWindow( |
| 31 const ServerWindow* window) const = 0; | 31 const ServerWindow* window) const = 0; |
| 32 | 32 |
| 33 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the | 33 // Schedules a callback to DestroySurfacesScheduledForDestruction() at the |
| 34 // appropriate time, which may be synchronously. | 34 // appropriate time, which may be synchronously. |
| 35 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; | 35 virtual void ScheduleSurfaceDestruction(ServerWindow* window) = 0; |
| 36 | 36 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 virtual ~ServerWindowDelegate() {} | 49 virtual ~ServerWindowDelegate() {} |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace ws | 52 } // namespace ws |
| 53 | 53 |
| 54 } // namespace mus | 54 } // namespace mus |
| 55 | 55 |
| 56 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ | 56 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_DELEGATE_H_ |
| OLD | NEW |