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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2652713003: aura-mus: Make StackAtTop() proxy to the window manager. (Closed)
Patch Set: Add check to window_manager_delegate_ in WmStackAtTop. 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 | « ui/aura/mus/window_tree_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index d5cef1fae1c448b7cc621187bf7ab32de56a5eb9..0ae7b855248f0aec78dd4bf89bc0c5cdef6ea326 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1510,6 +1510,25 @@ void WindowTreeClient::WmDeactivateWindow(Id window_id) {
window_manager_delegate_->OnWmDeactivateWindow(window->GetWindow());
}
+void WindowTreeClient::WmStackAtTop(uint32_t wm_change_id, uint32_t window_id) {
+ if (!window_manager_delegate_)
+ return;
+
+ WindowMus* window = GetWindowByServerId(window_id);
+ if (!window) {
+ DVLOG(1) << "Attempt to stack at top invalid window " << window_id;
+ if (window_manager_internal_client_)
+ window_manager_internal_client_->WmResponse(wm_change_id, false);
+ return;
+ }
+
+ Window* parent = window->GetWindow()->parent();
+ parent->StackChildAtTop(window->GetWindow());
+
+ if (window_manager_internal_client_)
+ window_manager_internal_client_->WmResponse(wm_change_id, true);
+}
+
void WindowTreeClient::OnAccelerator(uint32_t ack_id,
uint32_t accelerator_id,
std::unique_ptr<ui::Event> event) {
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698