| OLD | NEW |
| 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 #ifndef ASH_MUS_SHADOW_CONTROLLER_H_ | 5 #ifndef ASH_MUS_SHADOW_CONTROLLER_H_ |
| 6 #define ASH_MUS_SHADOW_CONTROLLER_H_ | 6 #define ASH_MUS_SHADOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "services/ui/public/cpp/window_observer.h" | 9 #include "services/ui/public/cpp/window_observer.h" |
| 10 #include "services/ui/public/cpp/window_tree_client_observer.h" | 10 #include "services/ui/public/cpp/window_tree_client_observer.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 class WindowTreeClient; | 13 class WindowTreeClient; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 namespace mus { | 17 namespace mus { |
| 18 | 18 |
| 19 class ShadowController : public ::ui::WindowTreeClientObserver, | 19 class ShadowController : public ui::WindowTreeClientObserver, |
| 20 public ::ui::WindowObserver { | 20 public ui::WindowObserver { |
| 21 public: | 21 public: |
| 22 explicit ShadowController(::ui::WindowTreeClient* window_tree); | 22 explicit ShadowController(ui::WindowTreeClient* window_tree); |
| 23 ~ShadowController() override; | 23 ~ShadowController() override; |
| 24 | 24 |
| 25 private: | 25 private: |
| 26 void SetActiveWindow(::ui::Window* window); | 26 void SetActiveWindow(ui::Window* window); |
| 27 | 27 |
| 28 // ui::WindowTreeClientObserver: | 28 // ui::WindowTreeClientObserver: |
| 29 void OnWindowTreeFocusChanged(::ui::Window* gained_focus, | 29 void OnWindowTreeFocusChanged(ui::Window* gained_focus, |
| 30 ::ui::Window* lost_focus) override; | 30 ui::Window* lost_focus) override; |
| 31 | 31 |
| 32 // ui::WindowObserver: | 32 // ui::WindowObserver: |
| 33 void OnWindowDestroying(::ui::Window* window) override; | 33 void OnWindowDestroying(ui::Window* window) override; |
| 34 | 34 |
| 35 ::ui::WindowTreeClient* window_tree_; | 35 ui::WindowTreeClient* window_tree_; |
| 36 ::ui::Window* active_window_; | 36 ui::Window* active_window_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(ShadowController); | 38 DISALLOW_COPY_AND_ASSIGN(ShadowController); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace mus | 41 } // namespace mus |
| 42 } // namespace ash | 42 } // namespace ash |
| 43 | 43 |
| 44 #endif // ASH_MUS_SHADOW_CONTROLLER_H_ | 44 #endif // ASH_MUS_SHADOW_CONTROLLER_H_ |
| OLD | NEW |