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

Unified Diff: ui/aura/mus/window_tree_client.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 | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | 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 9a4c1065d49ec4a0d9b071a135317d39d20ddd43..13660c96943379fbde45e8063fb00f656942a44e 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1466,6 +1466,24 @@ void WindowTreeClient::WmCancelMoveLoop(uint32_t change_id) {
window_manager_delegate_->OnWmCancelMoveLoop(window->GetWindow());
}
+void WindowTreeClient::WmDeactivateWindow(Id window_id) {
+ if (!window_manager_delegate_)
+ return;
+
+ WindowMus* window = GetWindowByServerId(window_id);
+ if (!window) {
+ DVLOG(1) << "Attempt to deactivate invalid window " << window_id;
+ return;
+ }
+
+ if (!window_manager_delegate_->IsWindowActive(window->GetWindow())) {
+ DVLOG(1) << "Non-active window requested deactivation.";
+ return;
+ }
+
+ window_manager_delegate_->OnWmDeactivateWindow(window->GetWindow());
+}
+
void WindowTreeClient::OnAccelerator(uint32_t ack_id,
uint32_t accelerator_id,
std::unique_ptr<ui::Event> event) {
@@ -1586,6 +1604,12 @@ void WindowTreeClient::OnWindowTreeHostHitTestMaskWillChange(
out_rect);
}
+void WindowTreeClient::OnWindowTreeHostDeactivateWindow(
+ WindowTreeHostMus* window_tree_host) {
+ tree_->DeactivateWindow(
+ WindowMus::Get(window_tree_host->window())->server_id());
+}
+
std::unique_ptr<WindowPortMus> WindowTreeClient::CreateWindowPortForTopLevel(
const std::map<std::string, std::vector<uint8_t>>* properties) {
std::unique_ptr<WindowPortMus> window_port =
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_host_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698