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

Unified Diff: components/mus/ws/window_tree_host_impl.cc

Issue 1639223003: Makes it so each windowtreeclient can use whatever ids it wants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 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
« no previous file with comments | « components/mus/ws/window_tree_host_impl.h ('k') | components/mus/ws/window_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_host_impl.cc
diff --git a/components/mus/ws/window_tree_host_impl.cc b/components/mus/ws/window_tree_host_impl.cc
index 1c5de0377445e1b9aa623aed9ee7299c2158b1eb..330ad06ccd209e8e54d4ab329a787d82095d7d6a 100644
--- a/components/mus/ws/window_tree_host_impl.cc
+++ b/components/mus/ws/window_tree_host_impl.cc
@@ -249,15 +249,13 @@ void WindowTreeHostImpl::RemoveAccelerator(uint32_t id) {
}
void WindowTreeHostImpl::AddActivationParent(Id transport_window_id) {
- ServerWindow* window = connection_manager_->GetWindow(
- MapWindowIdFromClient(transport_window_id));
+ ServerWindow* window = GetWindowFromWindowTreeHost(transport_window_id);
if (window)
activation_parents_.insert(window->id());
}
void WindowTreeHostImpl::RemoveActivationParent(Id transport_window_id) {
- ServerWindow* window = connection_manager_->GetWindow(
- MapWindowIdFromClient(transport_window_id));
+ ServerWindow* window = GetWindowFromWindowTreeHost(transport_window_id);
if (window)
activation_parents_.erase(window->id());
}
@@ -271,8 +269,7 @@ void WindowTreeHostImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
int32_t x_offset,
int32_t y_offset,
mojo::InsetsPtr hit_area) {
- ServerWindow* window =
- connection_manager_->GetWindow(WindowIdFromTransportId(window_id));
+ ServerWindow* window = GetWindowFromWindowTreeHost(window_id);
if (!window)
return;
@@ -280,11 +277,12 @@ void WindowTreeHostImpl::SetUnderlaySurfaceOffsetAndExtendedHitArea(
window->set_extended_hit_test_region(hit_area.To<gfx::Insets>());
}
-WindowId WindowTreeHostImpl::MapWindowIdFromClient(
- Id transport_window_id) const {
- const WindowTreeImpl* connection = GetWindowTree();
- return connection ? connection->MapWindowIdFromClient(transport_window_id)
- : WindowIdFromTransportId(transport_window_id);
+ServerWindow* WindowTreeHostImpl::GetWindowFromWindowTreeHost(
+ Id transport_window_id) {
+ WindowTreeImpl* connection = GetWindowTree();
+ if (!connection)
+ return nullptr;
+ return connection->GetWindowByClientId(ClientWindowId(transport_window_id));
}
void WindowTreeHostImpl::OnClientClosed() {
« no previous file with comments | « components/mus/ws/window_tree_host_impl.h ('k') | components/mus/ws/window_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698