Chromium Code Reviews| 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 COMPONENTS_MUS_WS_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ | 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 PlatformDisplay* CreatePlatformDisplay() override; | 209 PlatformDisplay* CreatePlatformDisplay() override; |
| 210 | 210 |
| 211 private: | 211 private: |
| 212 int32_t* cursor_id_storage_; | 212 int32_t* cursor_id_storage_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); | 214 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 // ----------------------------------------------------------------------------- | 217 // ----------------------------------------------------------------------------- |
| 218 | 218 |
| 219 // A stub implementation of PlatformDisplayDelegate containing a root | |
| 220 // ServerWindow. | |
| 221 class TestPlatformDisplayDelegate : public PlatformDisplayDelegate { | |
| 222 public: | |
| 223 TestPlatformDisplayDelegate(std::unique_ptr<ServerWindow> root); | |
|
sky
2016/06/27 15:17:08
explicit
mfomitchev
2016/06/30 22:06:03
Done.
| |
| 224 ~TestPlatformDisplayDelegate() override; | |
| 225 | |
| 226 // PlatformDisplayDelegate: | |
| 227 ServerWindow* GetRootWindow() override; | |
| 228 void OnDisplayClosed() override {} | |
| 229 void OnEvent(const ui::Event& event) override {} | |
| 230 void OnNativeCaptureLost() override {} | |
| 231 void OnViewportMetricsChanged(const ViewportMetrics& old_metrics, | |
| 232 const ViewportMetrics& new_metrics) override {} | |
| 233 void OnCompositorFrameDrawn() override {} | |
| 234 | |
| 235 private: | |
| 236 std::unique_ptr<ServerWindow> root_; | |
| 237 | |
| 238 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayDelegate); | |
| 239 }; | |
| 240 | |
| 241 // ----------------------------------------------------------------------------- | |
| 242 | |
| 219 class TestWindowManager : public mojom::WindowManager { | 243 class TestWindowManager : public mojom::WindowManager { |
| 220 public: | 244 public: |
| 221 TestWindowManager() | 245 TestWindowManager() |
| 222 : got_create_top_level_window_(false), | 246 : got_create_top_level_window_(false), |
| 223 change_id_(0u), | 247 change_id_(0u), |
| 224 on_accelerator_called_(false), | 248 on_accelerator_called_(false), |
| 225 on_accelerator_id_(0u) {} | 249 on_accelerator_id_(0u) {} |
| 226 ~TestWindowManager() override {} | 250 ~TestWindowManager() override {} |
| 227 | 251 |
| 228 bool did_call_create_top_level_window(uint32_t* change_id) { | 252 bool did_call_create_top_level_window(uint32_t* change_id) { |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 524 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 501 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 525 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
| 502 ServerWindow* parent, | 526 ServerWindow* parent, |
| 503 ClientWindowId* client_id); | 527 ClientWindowId* client_id); |
| 504 | 528 |
| 505 } // namespace test | 529 } // namespace test |
| 506 } // namespace ws | 530 } // namespace ws |
| 507 } // namespace mus | 531 } // namespace mus |
| 508 | 532 |
| 509 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ | 533 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| OLD | NEW |