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_TEST_UTILS_H_ | 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ |
6 #define SERVICES_UI_WS_TEST_UTILS_H_ | 6 #define SERVICES_UI_WS_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 bool did_call_create_top_level_window(uint32_t* change_id) { | 256 bool did_call_create_top_level_window(uint32_t* change_id) { |
257 if (!got_create_top_level_window_) | 257 if (!got_create_top_level_window_) |
258 return false; | 258 return false; |
259 | 259 |
260 got_create_top_level_window_ = false; | 260 got_create_top_level_window_ = false; |
261 *change_id = change_id_; | 261 *change_id = change_id_; |
262 return true; | 262 return true; |
263 } | 263 } |
264 | 264 |
| 265 bool on_perform_move_loop_called() { return on_perform_move_loop_called_; } |
265 bool on_accelerator_called() { return on_accelerator_called_; } | 266 bool on_accelerator_called() { return on_accelerator_called_; } |
266 uint32_t on_accelerator_id() { return on_accelerator_id_; } | 267 uint32_t on_accelerator_id() { return on_accelerator_id_; } |
267 | 268 |
268 private: | 269 private: |
269 // WindowManager: | 270 // WindowManager: |
270 void OnConnect(uint16_t client_id) override {} | 271 void OnConnect(uint16_t client_id) override {} |
271 void WmNewDisplayAdded(ui::mojom::DisplayPtr display, | 272 void WmNewDisplayAdded(ui::mojom::DisplayPtr display, |
272 ui::mojom::WindowDataPtr root, | 273 ui::mojom::WindowDataPtr root, |
273 bool drawn) override {} | 274 bool drawn) override {} |
274 void WmSetBounds(uint32_t change_id, | 275 void WmSetBounds(uint32_t change_id, |
275 uint32_t window_id, | 276 uint32_t window_id, |
276 const gfx::Rect& bounds) override {} | 277 const gfx::Rect& bounds) override {} |
277 void WmSetProperty(uint32_t change_id, | 278 void WmSetProperty(uint32_t change_id, |
278 uint32_t window_id, | 279 uint32_t window_id, |
279 const mojo::String& name, | 280 const mojo::String& name, |
280 mojo::Array<uint8_t> value) override {} | 281 mojo::Array<uint8_t> value) override {} |
281 void WmCreateTopLevelWindow( | 282 void WmCreateTopLevelWindow( |
282 uint32_t change_id, | 283 uint32_t change_id, |
283 ClientSpecificId requesting_client_id, | 284 ClientSpecificId requesting_client_id, |
284 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; | 285 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) override; |
285 void WmClientJankinessChanged(ClientSpecificId client_id, | 286 void WmClientJankinessChanged(ClientSpecificId client_id, |
286 bool janky) override; | 287 bool janky) override; |
| 288 void WmPerformMoveLoop(uint32_t change_id, |
| 289 uint32_t window_id, |
| 290 mojom::MoveLoopSource source, |
| 291 const gfx::Point& cursor_location) override; |
| 292 void WmCancelMoveLoop(uint32_t window_id) override; |
287 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; | 293 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; |
288 | 294 |
| 295 bool on_perform_move_loop_called_ = false; |
| 296 |
289 bool got_create_top_level_window_; | 297 bool got_create_top_level_window_; |
290 uint32_t change_id_; | 298 uint32_t change_id_; |
291 | 299 |
292 bool on_accelerator_called_; | 300 bool on_accelerator_called_; |
293 uint32_t on_accelerator_id_; | 301 uint32_t on_accelerator_id_; |
294 | 302 |
295 DISALLOW_COPY_AND_ASSIGN(TestWindowManager); | 303 DISALLOW_COPY_AND_ASSIGN(TestWindowManager); |
296 }; | 304 }; |
297 | 305 |
298 // ----------------------------------------------------------------------------- | 306 // ----------------------------------------------------------------------------- |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 536 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
529 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 537 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
530 ServerWindow* parent, | 538 ServerWindow* parent, |
531 ClientWindowId* client_id); | 539 ClientWindowId* client_id); |
532 | 540 |
533 } // namespace test | 541 } // namespace test |
534 } // namespace ws | 542 } // namespace ws |
535 } // namespace ui | 543 } // namespace ui |
536 | 544 |
537 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 545 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |