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

Unified Diff: services/ui/ws/test_utils.h

Issue 2346253004: Makes display roots be destroyed by client (Closed)
Patch Set: cleanup Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/display_unittest.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/test_utils.h
diff --git a/services/ui/ws/test_utils.h b/services/ui/ws/test_utils.h
index 5a78a1b47d265384c52685c42b5f5cc43f1d5b38..281d75623ae66e52a767f9f7de5ee16df6859d70 100644
--- a/services/ui/ws/test_utils.h
+++ b/services/ui/ws/test_utils.h
@@ -322,6 +322,8 @@ class TestWindowManager : public mojom::WindowManager {
bool on_perform_move_loop_called() { return on_perform_move_loop_called_; }
bool on_accelerator_called() { return on_accelerator_called_; }
uint32_t on_accelerator_id() { return on_accelerator_id_; }
+ bool got_display_removed() const { return got_display_removed_; }
+ int64_t display_removed_id() const { return display_removed_id_; }
private:
// WindowManager:
@@ -329,6 +331,7 @@ class TestWindowManager : public mojom::WindowManager {
void WmNewDisplayAdded(const display::Display& display,
ui::mojom::WindowDataPtr root,
bool drawn) override {}
+ void WmDisplayRemoved(int64_t display_id) override;
void WmSetBounds(uint32_t change_id,
uint32_t window_id,
const gfx::Rect& bounds) override {}
@@ -359,6 +362,9 @@ class TestWindowManager : public mojom::WindowManager {
bool on_accelerator_called_;
uint32_t on_accelerator_id_;
+ bool got_display_removed_ = false;
+ int64_t display_removed_id_ = 0;
+
DISALLOW_COPY_AND_ASSIGN(TestWindowManager);
};
@@ -472,6 +478,7 @@ class TestWindowTreeBinding : public WindowTreeBinding {
WindowTree* tree() { return tree_; }
TestWindowTreeClient* client() { return &client_; }
+ TestWindowManager* window_manager() { return window_manager_.get(); }
bool is_paused() const { return is_paused_; }
@@ -634,7 +641,7 @@ ClientWindowId ClientWindowIdForWindow(WindowTree* tree,
const ServerWindow* window);
// Creates a new visible window as a child of the single root of |tree|.
-// |client_id| set to the ClientWindowId of the new window.
+// |client_id| is set to the ClientWindowId of the new window.
ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id);
ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
ServerWindow* parent,
« no previous file with comments | « services/ui/ws/display_unittest.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698