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_WS_WINDOW_SERVER_TEST_IMPL_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_TEST_IMPL_H_ |
6 #define SERVICES_UI_WS_WINDOW_SERVER_TEST_IMPL_H_ | 6 #define SERVICES_UI_WS_WINDOW_SERVER_TEST_IMPL_H_ |
7 | 7 |
| 8 #include <map> |
| 9 |
8 #include "services/ui/public/interfaces/window_server_test.mojom.h" | 10 #include "services/ui/public/interfaces/window_server_test.mojom.h" |
9 | 11 |
10 namespace ui { | 12 namespace ui { |
11 namespace ws { | 13 namespace ws { |
12 | 14 |
13 class ServerWindow; | 15 class ServerWindow; |
14 class WindowServer; | 16 class WindowServer; |
15 | 17 |
16 class WindowServerTestImpl : public mojom::WindowServerTest { | 18 class WindowServerTestImpl : public mojom::WindowServerTest { |
17 public: | 19 public: |
18 explicit WindowServerTestImpl(WindowServer* server); | 20 explicit WindowServerTestImpl(WindowServer* server); |
19 ~WindowServerTestImpl() override; | 21 ~WindowServerTestImpl() override; |
20 | 22 |
21 private: | 23 private: |
22 void OnWindowPaint(const std::string& name, | 24 void OnWindowPaint(const std::string& name, |
23 const EnsureClientHasDrawnWindowCallback& cb, | 25 const EnsureClientHasDrawnRootWindowsCallback& cb, |
24 ServerWindow* window); | 26 ServerWindow* window); |
25 | 27 |
26 // mojom::WindowServerTest: | 28 // mojom::WindowServerTest: |
27 void EnsureClientHasDrawnWindow( | 29 void EnsureClientHasDrawnRootWindows( |
28 const std::string& client_name, | 30 const std::string& client_name, |
29 const EnsureClientHasDrawnWindowCallback& callback) override; | 31 const EnsureClientHasDrawnRootWindowsCallback& callback) override; |
30 | 32 |
31 WindowServer* window_server_; | 33 WindowServer* window_server_; |
| 34 std::map<std::string, unsigned> painted_window_roots_; |
32 | 35 |
33 DISALLOW_COPY_AND_ASSIGN(WindowServerTestImpl); | 36 DISALLOW_COPY_AND_ASSIGN(WindowServerTestImpl); |
34 }; | 37 }; |
35 | 38 |
36 } // namespace ws | 39 } // namespace ws |
37 } // namespace ui | 40 } // namespace ui |
38 | 41 |
39 #endif // SERVICES_UI_WS_WINDOW_SERVER_TEST_IMPL_H_ | 42 #endif // SERVICES_UI_WS_WINDOW_SERVER_TEST_IMPL_H_ |
OLD | NEW |