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

Side by Side Diff: components/mus/ws/connection_manager.cc

Issue 1648033002: Fix regression when resolving ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/ws/connection_manager.h" 5 #include "components/mus/ws/connection_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "components/mus/ws/client_connection.h" 9 #include "components/mus/ws/client_connection.h"
10 #include "components/mus/ws/connection_manager_delegate.h" 10 #include "components/mus/ws/connection_manager_delegate.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 pair.first->ScheduleSurfaceDestruction(window); 532 pair.first->ScheduleSurfaceDestruction(window);
533 break; 533 break;
534 } 534 }
535 } 535 }
536 } 536 }
537 537
538 ServerWindow* ConnectionManager::FindWindowForSurface( 538 ServerWindow* ConnectionManager::FindWindowForSurface(
539 const ServerWindow* ancestor, 539 const ServerWindow* ancestor,
540 mojom::SurfaceType surface_type, 540 mojom::SurfaceType surface_type,
541 const ClientWindowId& client_window_id) { 541 const ClientWindowId& client_window_id) {
542 WindowTreeImpl* window_tree = GetConnection(ancestor->id().connection_id); 542 WindowTreeImpl* window_tree;
543 if (ancestor->id().connection_id == kInvalidConnectionId)
544 window_tree = GetWindowTreeHostByWindow(ancestor)->GetWindowTree();
545 else
546 window_tree = GetConnection(ancestor->id().connection_id);
543 if (!window_tree) 547 if (!window_tree)
544 return nullptr; 548 return nullptr;
545 if (surface_type == mojom::SurfaceType::DEFAULT) { 549 if (surface_type == mojom::SurfaceType::DEFAULT) {
546 // At embed points the default surface comes from the embedded app. 550 // At embed points the default surface comes from the embedded app.
547 WindowTreeImpl* connection_with_root = GetConnectionWithRoot(ancestor); 551 WindowTreeImpl* connection_with_root = GetConnectionWithRoot(ancestor);
548 if (connection_with_root) 552 if (connection_with_root)
549 window_tree = connection_with_root; 553 window_tree = connection_with_root;
550 } 554 }
551 return window_tree->GetWindowByClientId(client_window_id); 555 return window_tree->GetWindowByClientId(client_window_id);
552 } 556 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 if (!got_valid_frame_decorations_) { 693 if (!got_valid_frame_decorations_) {
690 display_manager_observers_.AddInterfacePtr(std::move(observer)); 694 display_manager_observers_.AddInterfacePtr(std::move(observer));
691 return; 695 return;
692 } 696 }
693 CallOnDisplays(observer.get()); 697 CallOnDisplays(observer.get());
694 display_manager_observers_.AddInterfacePtr(std::move(observer)); 698 display_manager_observers_.AddInterfacePtr(std::move(observer));
695 } 699 }
696 700
697 } // namespace ws 701 } // namespace ws
698 } // namespace mus 702 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698