| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "cc/surfaces/surface_id.h" | 10 #include "cc/surfaces/surface_id.h" |
| 9 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 10 | 12 |
| 11 namespace cc { | 13 namespace cc { |
| 12 class SurfaceInfo; | 14 class SurfaceInfo; |
| 13 } | 15 } |
| 14 | 16 |
| 15 namespace ui { | 17 namespace ui { |
| 16 | 18 |
| 17 class Window; | 19 class Window; |
| 18 | 20 |
| 19 class SurfaceIdHandler { | 21 class SurfaceIdHandler { |
| 20 public: | 22 public: |
| 21 // Called when a child window allocates a new surface ID. | 23 // Called when a child window allocates a new surface ID. |
| 22 // If the handler wishes to retain ownership of the |surface_info|, | 24 // If the handler wishes to retain ownership of the |surface_info|, |
| 23 // it can move it. If a child's surface has been cleared then | 25 // it can move it. If a child's surface has been cleared then |
| 24 // |surface_info| will refer to a null pointer. | 26 // |surface_info| will refer to a null pointer. |
| 25 virtual void OnChildWindowSurfaceChanged( | 27 virtual void OnChildWindowSurfaceChanged( |
| 26 Window* window, | 28 Window* window, |
| 27 const cc::SurfaceInfo& surface_info) = 0; | 29 const cc::SurfaceInfo& surface_info) = 0; |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 } // namespace ui | 32 } // namespace ui |
| 31 | 33 |
| 32 #endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ | 34 #endif // SERVICES_UI_PUBLIC_CPP_SURFACE_ID_HANDLER_H_ |
| OLD | NEW |