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

Unified Diff: ui/aura/mus/window_tree_client.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: 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..51a37837bb4435879eacc49accce9abe96336f24 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -1466,6 +1466,19 @@ 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;
+ }
+
+ window_manager_delegate_->OnWmDeactivateWindow(window->GetWindow());
sky 2017/01/12 00:55:39 It seems like this should early out if window isn'
Elliot Glaysher 2017/01/12 23:20:37 Hoisted the early out check from inside OnWmDeacti
+}
+
void WindowTreeClient::OnAccelerator(uint32_t ack_id,
uint32_t accelerator_id,
std::unique_ptr<ui::Event> event) {
@@ -1586,6 +1599,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 =

Powered by Google App Engine
This is Rietveld 408576698