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

Side by Side Diff: ash/mus/window_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/mus/window_manager.h" 5 #include "ash/mus/window_manager.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 aura::Window* window, 492 aura::Window* window,
493 const gfx::Insets& insets, 493 const gfx::Insets& insets,
494 const std::vector<gfx::Rect>& additional_client_areas) { 494 const std::vector<gfx::Rect>& additional_client_areas) {
495 NonClientFrameController* non_client_frame_controller = 495 NonClientFrameController* non_client_frame_controller =
496 NonClientFrameController::Get(window); 496 NonClientFrameController::Get(window);
497 if (!non_client_frame_controller) 497 if (!non_client_frame_controller)
498 return; 498 return;
499 non_client_frame_controller->SetClientArea(insets, additional_client_areas); 499 non_client_frame_controller->SetClientArea(insets, additional_client_areas);
500 } 500 }
501 501
502 void WindowManager::OnWmDeactivateWindow(aura::Window* window) {
503 aura::client::ActivationClient* activation_client =
504 static_cast<aura::client::ActivationClient*>(focus_controller_.get());
505 if (activation_client->GetActiveWindow() != window) {
506 DVLOG(1) << "Non-active window requested deactivation.";
507 return;
508 }
509
510 activation_client->DeactivateWindow(window);
511 }
512
502 void WindowManager::OnWindowInitialized(aura::Window* window) { 513 void WindowManager::OnWindowInitialized(aura::Window* window) {
503 // This ensures WmWindowAura won't be called before WmWindowMus. This is 514 // This ensures WmWindowAura won't be called before WmWindowMus. This is
504 // important as if WmWindowAura::Get() is called first, then WmWindowAura 515 // important as if WmWindowAura::Get() is called first, then WmWindowAura
505 // would be created, not WmWindowMus. 516 // would be created, not WmWindowMus.
506 WmWindowMus::Get(window); 517 WmWindowMus::Get(window);
507 } 518 }
508 519
509 } // namespace mus 520 } // namespace mus
510 } // namespace ash 521 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698