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

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

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 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
Index: services/ui/ws/test_utils.cc
diff --git a/services/ui/ws/test_utils.cc b/services/ui/ws/test_utils.cc
index 1506bdcb8a974b461c9bb8ef6876088848bc65cd..2410a059182f03e19cc6cdf4a468f858d541c2df 100644
--- a/services/ui/ws/test_utils.cc
+++ b/services/ui/ws/test_utils.cc
@@ -291,9 +291,11 @@ void TestWindowTreeClient::OnTopLevelCreated(uint32_t change_id,
tracker_.OnTopLevelCreated(change_id, std::move(data), drawn);
}
-void TestWindowTreeClient::OnWindowBoundsChanged(uint32_t window,
- const gfx::Rect& old_bounds,
- const gfx::Rect& new_bounds) {
+void TestWindowTreeClient::OnWindowBoundsChanged(
+ uint32_t window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds,
+ const cc::LocalFrameId& local_frame_id) {
tracker_.OnWindowBoundsChanged(window, std::move(old_bounds),
std::move(new_bounds));
}
@@ -511,10 +513,11 @@ ServerWindow* WindowEventTargetingHelper::CreatePrimaryTree(
WindowTree* wm_tree = window_server()->GetTreeWithId(1);
const ClientWindowId embed_window_id(
WindowIdToTransportId(WindowId(wm_tree->id(), 1)));
- EXPECT_TRUE(wm_tree->NewWindow(embed_window_id, ServerWindow::Properties()));
+ EXPECT_TRUE(wm_tree->NewWindow(embed_window_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
EXPECT_TRUE(wm_tree->SetWindowVisibility(embed_window_id, true));
EXPECT_TRUE(wm_tree->AddWindow(FirstRootId(wm_tree), embed_window_id));
- display_->root_window()->SetBounds(root_window_bounds);
+ display_->root_window()->SetBounds(root_window_bounds, cc::LocalFrameId());
mojom::WindowTreeClientPtr client;
mojom::WindowTreeClientRequest client_request(&client);
wm_client_->Bind(std::move(client_request));
@@ -526,7 +529,7 @@ ServerWindow* WindowEventTargetingHelper::CreatePrimaryTree(
EXPECT_NE(tree1, wm_tree);
WindowTreeTestApi(tree1).set_user_id(wm_tree->user_id());
- embed_window->SetBounds(window_bounds);
+ embed_window->SetBounds(window_bounds, cc::LocalFrameId());
return embed_window;
}
@@ -541,7 +544,8 @@ void WindowEventTargetingHelper::CreateSecondaryTree(
ASSERT_TRUE(tree1 != nullptr);
const ClientWindowId child1_id(
WindowIdToTransportId(WindowId(tree1->id(), 1)));
- EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties()));
+ EXPECT_TRUE(tree1->NewWindow(child1_id, ServerWindow::Properties(),
+ cc::LocalFrameId()));
ServerWindow* child1 = tree1->GetWindowByClientId(child1_id);
ASSERT_TRUE(child1);
EXPECT_TRUE(tree1->AddWindow(ClientWindowIdForWindow(tree1, embed_window),
@@ -549,7 +553,7 @@ void WindowEventTargetingHelper::CreateSecondaryTree(
tree1->GetDisplay(embed_window)->AddActivationParent(embed_window);
child1->SetVisible(true);
- child1->SetBounds(window_bounds);
+ child1->SetBounds(window_bounds, cc::LocalFrameId());
EnableHitTest(child1);
TestWindowTreeClient* embed_client =
@@ -623,7 +627,8 @@ ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
if (!tree->IsWindowKnown(parent, &parent_client_id))
return nullptr;
ClientWindowId client_window_id = NextUnusedClientWindowId(tree);
- if (!tree->NewWindow(client_window_id, ServerWindow::Properties()))
+ if (!tree->NewWindow(client_window_id, ServerWindow::Properties(),
+ cc::LocalFrameId()))
return nullptr;
if (!tree->SetWindowVisibility(client_window_id, true))
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698