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

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

Issue 2568303006: aura-mus: Implement Deactivate(). (Closed)
Patch Set: Add comment. 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
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e424cf317f94becfbcf48d41513cabe789e1dcec 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -1585,6 +1585,26 @@ void WindowTree::SetPredefinedCursor(uint32_t change_id,
client()->OnChangeCompleted(change_id, success);
}
+void WindowTree::DeactivateWindow(Id window_id) {
+ ServerWindow* window =
+ GetWindowByClientId(ClientWindowId(window_id));
+ if (!window) {
+ DVLOG(1) << "DeactivateWindow failed (invalid id)";
+ return;
+ }
+
+ WindowManagerDisplayRoot* display_root = GetWindowManagerDisplayRoot(window);
+ if (!display_root) {
+ // The window isn't parented. There's nothing to do.
+ DVLOG(1) << "DeactivateWindow failed (window unparented)";
+ return;
+ }
+
+ 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_ ||
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698