| 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 "services/ui/ws/server_window_delegate.h" | 9 #include "services/ui/ws/server_window_delegate.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 namespace ws { | 13 namespace ws { |
| 14 | 14 |
| 15 struct WindowId; | 15 struct WindowId; |
| 16 | 16 |
| 17 class TestServerWindowDelegate : public ServerWindowDelegate { | 17 class TestServerWindowDelegate : public ServerWindowDelegate { |
| 18 public: | 18 public: |
| 19 TestServerWindowDelegate(); | 19 TestServerWindowDelegate(); |
| 20 ~TestServerWindowDelegate() override; | 20 ~TestServerWindowDelegate() override; |
| 21 | 21 |
| 22 void set_root_window(const ServerWindow* window) { root_window_ = window; } | 22 void set_root_window(ServerWindow* window) { root_window_ = window; } |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 // ServerWindowDelegate: | 25 // ServerWindowDelegate: |
| 26 ui::DisplayCompositor* GetDisplayCompositor() override; | 26 ui::DisplayCompositor* GetDisplayCompositor() override; |
| 27 void OnScheduleWindowPaint(ServerWindow* window) override; | 27 ServerWindow* GetRootWindow(const ServerWindow* window) override; |
| 28 const ServerWindow* GetRootWindow(const ServerWindow* window) const override; | |
| 29 | 28 |
| 30 const ServerWindow* root_window_; | 29 ServerWindow* root_window_; |
| 31 scoped_refptr<ui::DisplayCompositor> display_compositor_; | 30 scoped_refptr<ui::DisplayCompositor> display_compositor_; |
| 32 | 31 |
| 33 DISALLOW_COPY_AND_ASSIGN(TestServerWindowDelegate); | 32 DISALLOW_COPY_AND_ASSIGN(TestServerWindowDelegate); |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace ws | 35 } // namespace ws |
| 37 | 36 |
| 38 } // namespace ui | 37 } // namespace ui |
| 39 | 38 |
| 40 #endif // SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ | 39 #endif // SERVICES_UI_WS_TEST_SERVER_WINDOW_DELEGATE_H_ |
| OLD | NEW |