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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 5f5ff4cdcd67425d3d866a12fb5003153b24ad81..b24cd67afeec0b8d5712019dc26211ea31faad53 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -439,13 +439,14 @@ void WindowTreeClient::SetLocalPropertiesFromServerProperties(
std::unique_ptr<WindowTreeHostMus> WindowTreeClient::CreateWindowTreeHost(
WindowMusType window_mus_type,
const ui::mojom::WindowData& window_data,
- int64_t display_id) {
+ int64_t display_id,
+ const cc::FrameSinkId& frame_sink_id) {
std::unique_ptr<WindowPortMus> window_port =
CreateWindowPortMus(window_data, window_mus_type);
roots_.insert(window_port.get());
std::unique_ptr<WindowTreeHostMus> window_tree_host =
base::MakeUnique<WindowTreeHostMus>(std::move(window_port), this,
- display_id);
+ display_id, frame_sink_id);
window_tree_host->InitHost();
SetLocalPropertiesFromServerProperties(
WindowMus::Get(window_tree_host->window()), window_data);
@@ -534,15 +535,16 @@ void WindowTreeClient::OnEmbedImpl(ui::mojom::WindowTree* window_tree,
ui::mojom::WindowDataPtr root_data,
int64_t display_id,
Id focused_window_id,
- bool drawn) {
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id) {
// WARNING: this is only called if WindowTreeClient was created as the
// result of an embedding.
client_id_ = client_id;
WindowTreeConnectionEstablished(window_tree);
DCHECK(roots_.empty());
- std::unique_ptr<WindowTreeHostMus> window_tree_host =
- CreateWindowTreeHost(WindowMusType::EMBED, *root_data, display_id);
+ std::unique_ptr<WindowTreeHostMus> window_tree_host = CreateWindowTreeHost(
+ WindowMusType::EMBED, *root_data, display_id, frame_sink_id);
focus_synchronizer_->SetFocusFromServer(
GetWindowByServerId(focused_window_id));
@@ -553,13 +555,14 @@ void WindowTreeClient::OnEmbedImpl(ui::mojom::WindowTree* window_tree,
WindowTreeHostMus* WindowTreeClient::WmNewDisplayAddedImpl(
const display::Display& display,
ui::mojom::WindowDataPtr root_data,
- bool parent_drawn) {
+ bool parent_drawn,
+ const cc::FrameSinkId& frame_sink_id) {
DCHECK(window_manager_delegate_);
window_manager_delegate_->OnWmWillCreateDisplay(display);
- std::unique_ptr<WindowTreeHostMus> window_tree_host =
- CreateWindowTreeHost(WindowMusType::DISPLAY, *root_data, display.id());
+ std::unique_ptr<WindowTreeHostMus> window_tree_host = CreateWindowTreeHost(
+ WindowMusType::DISPLAY, *root_data, display.id(), frame_sink_id);
WindowTreeHostMus* window_tree_host_ptr = window_tree_host.get();
window_manager_delegate_->OnWmNewDisplay(std::move(window_tree_host),
@@ -877,7 +880,8 @@ void WindowTreeClient::OnEmbed(ClientSpecificId client_id,
ui::mojom::WindowTreePtr tree,
int64_t display_id,
Id focused_window_id,
- bool drawn) {
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id) {
DCHECK(!tree_ptr_);
tree_ptr_ = std::move(tree);
@@ -889,7 +893,7 @@ void WindowTreeClient::OnEmbed(ClientSpecificId client_id,
}
OnEmbedImpl(tree_ptr_.get(), client_id, std::move(root_data), display_id,
- focused_window_id, drawn);
+ focused_window_id, drawn, frame_sink_id);
}
void WindowTreeClient::OnEmbeddedAppDisconnected(Id window_id) {
@@ -925,7 +929,8 @@ void WindowTreeClient::OnCaptureChanged(Id new_capture_window_id,
void WindowTreeClient::OnTopLevelCreated(uint32_t change_id,
ui::mojom::WindowDataPtr data,
int64_t display_id,
- bool drawn) {
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id) {
// The server ack'd the top level window we created and supplied the state
// of the window at the time the server created it. For properties we do not
// have changes in flight for we can update them immediately. For properties
@@ -989,6 +994,8 @@ void WindowTreeClient::OnTopLevelCreated(uint32_t change_id,
// Top level windows should not have a parent.
DCHECK_EQ(0u, data->parent_id);
+
+ window->SetFrameSinkIdFromServer(frame_sink_id);
}
void WindowTreeClient::OnWindowBoundsChanged(
@@ -1357,8 +1364,10 @@ void WindowTreeClient::OnConnect(ClientSpecificId client_id) {
void WindowTreeClient::WmNewDisplayAdded(const display::Display& display,
ui::mojom::WindowDataPtr root_data,
- bool parent_drawn) {
- WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn);
+ bool parent_drawn,
+ const cc::FrameSinkId& frame_sink_id) {
+ WmNewDisplayAddedImpl(display, std::move(root_data), parent_drawn,
+ frame_sink_id);
}
void WindowTreeClient::WmDisplayRemoved(int64_t display_id) {
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698