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

Unified Diff: services/ui/ws/window_tree.cc

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Prune comments and other debugging gunk. Created 3 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
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_ ||

Powered by Google App Engine
This is Rietveld 408576698