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

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

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows 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/public/cpp/window_tree_client.h ('k') | services/ui/public/interfaces/surface.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87fa4dc00c37b423e30046b6f7b2181269a9d81f..cedfe0a2cf6adf3ba7e4fcc0ee8b8c1942ce477d 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::SatisfySurfaceSequence(
+ Id window_id,
+ const cc::SurfaceSequence& sequence) {
+ DCHECK(tree_);
+ tree_->SatisfySurfaceSequence(window_id, sequence);
+}
+
void WindowTreeClient::LocalSetCapture(Window* window) {
if (capture_window_ == window)
return;
@@ -489,10 +496,11 @@ Window* WindowTreeClient::BuildWindowTree(
Window* WindowTreeClient::NewWindowImpl(
NewWindowType type,
- const Window::SharedProperties* properties) {
+ const Window::SharedProperties* properties,
+ bool container) {
DCHECK(tree_);
- Window* window =
- new Window(this, MakeTransportId(client_id_, next_window_id_++));
+ Window* window = new Window(
+ this, MakeTransportId(client_id_, next_window_id_++), container);
if (properties)
window->properties_ = *properties;
AddWindow(window);
@@ -694,9 +702,9 @@ void WindowTreeClient::CancelWindowMove(Window* window) {
tree_->CancelWindowMove(window->server_id());
}
-Window* WindowTreeClient::NewWindow(
- const Window::SharedProperties* properties) {
- return NewWindowImpl(NewWindowType::CHILD, properties);
+Window* WindowTreeClient::NewWindow(const Window::SharedProperties* properties,
+ bool container) {
+ return NewWindowImpl(NewWindowType::CHILD, properties, container);
}
Window* WindowTreeClient::NewTopLevelWindow(
@@ -886,6 +894,21 @@ void WindowTreeClient::OnWindowBoundsChanged(Id window_id,
WindowPrivate(window).LocalSetBounds(old_bounds, new_bounds);
}
+void WindowTreeClient::OnWindowSurfaceCreated(
+ Id window_id,
+ const gfx::Size& size,
+ float device_scale_factor,
+ const cc::SurfaceId& surface_id,
+ const cc::SurfaceSequence& surface_sequence) {
+ Window* window = GetWindowByServerId(window_id);
+ if (!window)
+ return;
+
+ // TODO(fsamuel): Figure out lifetime management.
+ WindowPrivate(window).LocalSetSurfaceId(size, device_scale_factor, surface_id,
+ surface_sequence);
+}
+
void WindowTreeClient::OnClientAreaChanged(
uint32_t window_id,
const gfx::Insets& new_client_area,
« no previous file with comments | « services/ui/public/cpp/window_tree_client.h ('k') | services/ui/public/interfaces/surface.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698