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

Unified Diff: services/ui/public/cpp/window_tree_client.cc

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: updated comment Created 4 years, 2 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/public/cpp/window_tree_client.cc
diff --git a/services/ui/public/cpp/window_tree_client.cc b/services/ui/public/cpp/window_tree_client.cc
index bd2d3578d7a1033c33fd34e85b2c038d8d93a14c..cb853615661265355d512e5955d0940a6dcbd06d 100644
--- a/services/ui/public/cpp/window_tree_client.cc
+++ b/services/ui/public/cpp/window_tree_client.cc
@@ -356,6 +356,13 @@ void WindowTreeClient::AttachSurface(
tree_->AttachSurface(window_id, type, std::move(surface), std::move(client));
}
+void WindowTreeClient::ReturnSurfaceReference(
+ Id window_id,
+ const cc::SurfaceSequence& sequence) {
+ DCHECK(tree_);
+ tree_->ReturnSurfaceReference(window_id, sequence);
+}
+
void WindowTreeClient::LocalSetCapture(Window* window) {
if (capture_window_ == window)
return;
@@ -1092,6 +1099,24 @@ void WindowTreeClient::OnWindowPredefinedCursorChanged(
WindowPrivate(window).LocalSetPredefinedCursor(cursor);
}
+void WindowTreeClient::OnWindowSurfaceCreated(
+ Id window_id,
+ const cc::SurfaceId& surface_id,
+ const cc::SurfaceSequence& surface_sequence,
+ const gfx::Size& frame_size,
+ float device_scale_factor) {
+ Window* window = GetWindowByServerId(window_id);
+ if (!window)
+ return;
+ std::unique_ptr<Window::SurfaceInfo> surface_info(
+ base::MakeUnique<Window::SurfaceInfo>());
+ surface_info->surface_id = surface_id;
+ surface_info->surface_sequence = surface_sequence;
+ surface_info->frame_size = frame_size;
+ surface_info->device_scale_factor = device_scale_factor;
+ WindowPrivate(window).LocalSetSurfaceId(std::move(surface_info));
+}
+
void WindowTreeClient::OnDragDropStart(
mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {
mime_drag_data_ = std::move(mime_data);

Powered by Google App Engine
This is Rietveld 408576698