Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: services/ui/ws/test_utils.h

Issue 2745143004: Inform window manager about modal windows in mus+ash. (Closed)
Patch Set: rebased. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void ClearAcceleratorCalled() { 324 void ClearAcceleratorCalled() {
325 on_accelerator_id_ = 0u; 325 on_accelerator_id_ = 0u;
326 on_accelerator_called_ = false; 326 on_accelerator_called_ = false;
327 } 327 }
328 328
329 bool on_perform_move_loop_called() { return on_perform_move_loop_called_; } 329 bool on_perform_move_loop_called() { return on_perform_move_loop_called_; }
330 bool on_accelerator_called() { return on_accelerator_called_; } 330 bool on_accelerator_called() { return on_accelerator_called_; }
331 uint32_t on_accelerator_id() { return on_accelerator_id_; } 331 uint32_t on_accelerator_id() { return on_accelerator_id_; }
332 bool got_display_removed() const { return got_display_removed_; } 332 bool got_display_removed() const { return got_display_removed_; }
333 int64_t display_removed_id() const { return display_removed_id_; } 333 int64_t display_removed_id() const { return display_removed_id_; }
334 bool on_set_modal_type_called() { return on_set_modal_type_called_; }
334 335
335 private: 336 private:
336 // WindowManager: 337 // WindowManager:
337 void OnConnect(uint16_t client_id) override {} 338 void OnConnect(uint16_t client_id) override {}
338 void WmNewDisplayAdded(const display::Display& display, 339 void WmNewDisplayAdded(const display::Display& display,
339 ui::mojom::WindowDataPtr root, 340 ui::mojom::WindowDataPtr root,
340 bool drawn) override {} 341 bool drawn) override {}
341 void WmDisplayRemoved(int64_t display_id) override; 342 void WmDisplayRemoved(int64_t display_id) override;
342 void WmDisplayModified(const display::Display& display) override {} 343 void WmDisplayModified(const display::Display& display) override {}
343 void WmSetBounds(uint32_t change_id, 344 void WmSetBounds(uint32_t change_id,
344 uint32_t window_id, 345 uint32_t window_id,
345 const gfx::Rect& bounds) override {} 346 const gfx::Rect& bounds) override {}
346 void WmSetProperty( 347 void WmSetProperty(
347 uint32_t change_id, 348 uint32_t change_id,
348 uint32_t window_id, 349 uint32_t window_id,
349 const std::string& name, 350 const std::string& name,
350 const base::Optional<std::vector<uint8_t>>& value) override {} 351 const base::Optional<std::vector<uint8_t>>& value) override {}
352 void WmSetModalType(uint32_t window_id, ui::ModalType type) override;
351 void WmSetCanFocus(uint32_t window_id, bool can_focus) override {} 353 void WmSetCanFocus(uint32_t window_id, bool can_focus) override {}
352 void WmCreateTopLevelWindow( 354 void WmCreateTopLevelWindow(
353 uint32_t change_id, 355 uint32_t change_id,
354 ClientSpecificId requesting_client_id, 356 ClientSpecificId requesting_client_id,
355 const std::unordered_map<std::string, std::vector<uint8_t>>& properties) 357 const std::unordered_map<std::string, std::vector<uint8_t>>& properties)
356 override; 358 override;
357 void WmClientJankinessChanged(ClientSpecificId client_id, 359 void WmClientJankinessChanged(ClientSpecificId client_id,
358 bool janky) override; 360 bool janky) override;
359 void WmPerformMoveLoop(uint32_t change_id, 361 void WmPerformMoveLoop(uint32_t change_id,
360 uint32_t window_id, 362 uint32_t window_id,
361 mojom::MoveLoopSource source, 363 mojom::MoveLoopSource source,
362 const gfx::Point& cursor_location) override; 364 const gfx::Point& cursor_location) override;
363 void WmCancelMoveLoop(uint32_t window_id) override; 365 void WmCancelMoveLoop(uint32_t window_id) override;
364 void WmDeactivateWindow(uint32_t window_id) override; 366 void WmDeactivateWindow(uint32_t window_id) override;
365 void WmStackAbove(uint32_t change_id, uint32_t above_id, 367 void WmStackAbove(uint32_t change_id, uint32_t above_id,
366 uint32_t below_id) override; 368 uint32_t below_id) override;
367 void WmStackAtTop(uint32_t change_id, uint32_t window_id) override; 369 void WmStackAtTop(uint32_t change_id, uint32_t window_id) override;
368 void OnAccelerator(uint32_t ack_id, 370 void OnAccelerator(uint32_t ack_id,
369 uint32_t accelerator_id, 371 uint32_t accelerator_id,
370 std::unique_ptr<ui::Event> event) override; 372 std::unique_ptr<ui::Event> event) override;
371 373
372 bool on_perform_move_loop_called_ = false; 374 bool on_perform_move_loop_called_ = false;
375 bool on_set_modal_type_called_ = false;
373 376
374 bool got_create_top_level_window_; 377 bool got_create_top_level_window_;
375 uint32_t change_id_; 378 uint32_t change_id_;
376 379
377 bool on_accelerator_called_; 380 bool on_accelerator_called_;
378 uint32_t on_accelerator_id_; 381 uint32_t on_accelerator_id_;
379 382
380 bool got_display_removed_ = false; 383 bool got_display_removed_ = false;
381 int64_t display_removed_id_ = 0; 384 int64_t display_removed_id_ = 0;
382 385
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); 689 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
687 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 690 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
688 ServerWindow* parent, 691 ServerWindow* parent,
689 ClientWindowId* client_id = nullptr); 692 ClientWindowId* client_id = nullptr);
690 693
691 } // namespace test 694 } // namespace test
692 } // namespace ws 695 } // namespace ws
693 } // namespace ui 696 } // namespace ui
694 697
695 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 698 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698