Chromium Code Reviews| Index: services/ui/ws/window_tree.cc |
| diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc |
| index 4abe468092909ef7d03cdc6413366c6de8f17981..1ecebba57f34b88df9169d74ad8795a86d700a6f 100644 |
| --- a/services/ui/ws/window_tree.cc |
| +++ b/services/ui/ws/window_tree.cc |
| @@ -1585,6 +1585,21 @@ void WindowTree::SetPredefinedCursor(uint32_t change_id, |
| client()->OnChangeCompleted(change_id, success); |
| } |
| +void WindowTree::DeactivateWindow(Id requester_window_id) { |
|
sky
2017/01/12 00:55:39
window_id
Elliot Glaysher
2017/01/12 23:20:37
Done.
|
| + ServerWindow* window = |
| + GetWindowByClientId(ClientWindowId(requester_window_id)); |
| + if (!window) { |
| + DVLOG(1) << "ActivateNextWindow received invalid id."; |
| + return; |
| + } |
| + |
| + WindowManagerDisplayRoot* display_root = |
|
sky
2017/01/12 00:55:39
Make sure you null check display_root. null happen
Elliot Glaysher
2017/01/12 23:20:37
Done.
|
| + GetWindowManagerDisplayRoot(window); |
| + WindowTree* wm_tree = display_root->window_manager_state()->window_tree(); |
| + wm_tree->window_manager_internal_->WmDeactivateWindow( |
| + wm_tree->ClientWindowIdForWindow(window).id); |
| +} |
| + |
| void WindowTree::GetWindowManagerClient( |
| mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal) { |
| if (!access_policy_->CanSetWindowManager() || !window_manager_internal_ || |