| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_MUS_SHADOW_CONTROLLER_H_ | |
| 6 #define ASH_MUS_SHADOW_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/aura/client/focus_change_observer.h" | |
| 10 #include "ui/aura/env_observer.h" | |
| 11 #include "ui/aura/window_observer.h" | |
| 12 | |
| 13 namespace aura { | |
| 14 namespace client { | |
| 15 class FocusClient; | |
| 16 } | |
| 17 } | |
| 18 | |
| 19 namespace ash { | |
| 20 namespace mus { | |
| 21 | |
| 22 // TODO: use the wm::ShadowController. http://crbug.com/670840. | |
| 23 class ShadowController : public aura::EnvObserver, | |
| 24 public aura::WindowObserver, | |
| 25 public aura::client::FocusChangeObserver { | |
| 26 public: | |
| 27 ShadowController(); | |
| 28 ~ShadowController() override; | |
| 29 | |
| 30 private: | |
| 31 void SetActiveWindow(aura::Window* window); | |
| 32 void SetFocusClient(aura::client::FocusClient* focus_client); | |
| 33 | |
| 34 // aura::EnvObserver: | |
| 35 void OnWindowInitialized(aura::Window* window) override; | |
| 36 void OnActiveFocusClientChanged(aura::client::FocusClient* focus_client, | |
| 37 aura::Window* window) override; | |
| 38 | |
| 39 // aura::client::FocusChangeObserver: | |
| 40 void OnWindowFocused(aura::Window* gained_focus, | |
| 41 aura::Window* lost_focus) override; | |
| 42 | |
| 43 // ui::WindowObserver: | |
| 44 void OnWindowDestroying(aura::Window* window) override; | |
| 45 | |
| 46 aura::Window* active_window_ = nullptr; | |
| 47 aura::client::FocusClient* active_focus_client_ = nullptr; | |
| 48 | |
| 49 DISALLOW_COPY_AND_ASSIGN(ShadowController); | |
| 50 }; | |
| 51 | |
| 52 } // namespace mus | |
| 53 } // namespace ash | |
| 54 | |
| 55 #endif // ASH_MUS_SHADOW_CONTROLLER_H_ | |
| OLD | NEW |