| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_EXO_WM_HELPER_MUS_H_ | 5 #ifndef COMPONENTS_EXO_WM_HELPER_MUS_H_ |
| 6 #define COMPONENTS_EXO_WM_HELPER_MUS_H_ | 6 #define COMPONENTS_EXO_WM_HELPER_MUS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/exo/wm_helper.h" | 9 #include "components/exo/wm_helper.h" |
| 10 #include "services/ui/public/cpp/window_tree_client_observer.h" | 10 #include "services/ui/public/cpp/window_tree_client_observer.h" |
| 11 #include "ui/aura/client/focus_change_observer.h" | 11 #include "ui/aura/client/focus_change_observer.h" |
| 12 #include "ui/events/devices/input_device_event_observer.h" |
| 12 | 13 |
| 13 namespace exo { | 14 namespace exo { |
| 14 | 15 |
| 15 // A helper class for accessing WindowManager related features. | 16 // A helper class for accessing WindowManager related features. |
| 16 class WMHelperMus : public WMHelper, | 17 class WMHelperMus : public WMHelper, |
| 18 public ui::InputDeviceEventObserver, |
| 17 public ui::WindowTreeClientObserver, | 19 public ui::WindowTreeClientObserver, |
| 18 public aura::client::FocusChangeObserver { | 20 public aura::client::FocusChangeObserver { |
| 19 public: | 21 public: |
| 20 WMHelperMus(); | 22 WMHelperMus(); |
| 21 ~WMHelperMus() override; | 23 ~WMHelperMus() override; |
| 22 | 24 |
| 23 // Overriden from WMHelper: | 25 // Overriden from WMHelper: |
| 24 const display::ManagedDisplayInfo GetDisplayInfo( | 26 const display::ManagedDisplayInfo GetDisplayInfo( |
| 25 int64_t display_id) const override; | 27 int64_t display_id) const override; |
| 26 aura::Window* GetContainer(int container_id) override; | 28 aura::Window* GetContainer(int container_id) override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 void PlayEarcon(int sound_key) const override; | 39 void PlayEarcon(int sound_key) const override; |
| 38 | 40 |
| 39 // Overriden from ui::WindowTreeClientObserver: | 41 // Overriden from ui::WindowTreeClientObserver: |
| 40 void OnWindowTreeFocusChanged(ui::Window* gained_focus, | 42 void OnWindowTreeFocusChanged(ui::Window* gained_focus, |
| 41 ui::Window* lost_focus) override; | 43 ui::Window* lost_focus) override; |
| 42 | 44 |
| 43 // Overriden from ui::client::FocusChangeObserver: | 45 // Overriden from ui::client::FocusChangeObserver: |
| 44 void OnWindowFocused(aura::Window* gained_focus, | 46 void OnWindowFocused(aura::Window* gained_focus, |
| 45 aura::Window* lost_focus) override; | 47 aura::Window* lost_focus) override; |
| 46 | 48 |
| 49 // Overriden from ui::InputDeviceEventObserver: |
| 50 void OnKeyboardDeviceConfigurationChanged() override; |
| 51 |
| 47 private: | 52 private: |
| 48 aura::Window* active_window_; | 53 aura::Window* active_window_; |
| 49 aura::Window* focused_window_; | 54 aura::Window* focused_window_; |
| 50 | 55 |
| 51 DISALLOW_COPY_AND_ASSIGN(WMHelperMus); | 56 DISALLOW_COPY_AND_ASSIGN(WMHelperMus); |
| 52 }; | 57 }; |
| 53 | 58 |
| 54 } // namespace exo | 59 } // namespace exo |
| 55 | 60 |
| 56 #endif // COMPONENTS_EXO_WM_HELPER_H_ | 61 #endif // COMPONENTS_EXO_WM_HELPER_H_ |
| OLD | NEW |