| 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 SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ |
| 6 #define SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ | 6 #define SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/surfaces/surface_id.h" |
| 9 #include "services/ui/ws/server_window_delegate.h" | 10 #include "services/ui/ws/server_window_delegate.h" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 namespace mojom { | 13 namespace mojom { |
| 13 class DisplayCompositor; | 14 class DisplayCompositor; |
| 14 } | 15 } |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace ui { | 18 namespace ui { |
| 18 | |
| 19 namespace ws { | 19 namespace ws { |
| 20 | 20 |
| 21 class TestServerWindowDelegate : public ServerWindowDelegate { | 21 class TestServerWindowDelegate : public ServerWindowDelegate { |
| 22 public: | 22 public: |
| 23 TestServerWindowDelegate(); | 23 TestServerWindowDelegate(); |
| 24 ~TestServerWindowDelegate() override; | 24 ~TestServerWindowDelegate() override; |
| 25 | 25 |
| 26 void set_root_window(ServerWindow* window) { root_window_ = window; } | 26 void set_root_window(ServerWindow* window) { root_window_ = window; } |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // ServerWindowDelegate: | 29 // ServerWindowDelegate: |
| 30 cc::mojom::DisplayCompositor* GetDisplayCompositor() override; | 30 cc::mojom::DisplayCompositor* GetDisplayCompositor() override; |
| 31 const cc::SurfaceId& GetRootSurfaceId() const override; |
| 31 ServerWindow* GetRootWindow(const ServerWindow* window) override; | 32 ServerWindow* GetRootWindow(const ServerWindow* window) override; |
| 32 | 33 |
| 33 ServerWindow* root_window_; | 34 cc::SurfaceId root_surface_id_; |
| 35 ServerWindow* root_window_ = nullptr; |
| 34 | 36 |
| 35 DISALLOW_COPY_AND_ASSIGN(TestServerWindowDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(TestServerWindowDelegate); |
| 36 }; | 38 }; |
| 37 | 39 |
| 38 } // namespace ws | 40 } // namespace ws |
| 39 | |
| 40 } // namespace ui | 41 } // namespace ui |
| 41 | 42 |
| 42 #endif // SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ | 43 #endif // SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ |
| OLD | NEW |