Chromium Code Reviews| Index: components/exo/keyboard.h |
| diff --git a/components/exo/keyboard.h b/components/exo/keyboard.h |
| index 9a20afd771daa51e6bd5182a027e1463578a4c2f..683bf7f3238915c0e973ff81a7b8e1b9f159d43b 100644 |
| --- a/components/exo/keyboard.h |
| +++ b/components/exo/keyboard.h |
| @@ -10,7 +10,6 @@ |
| #include "base/macros.h" |
| #include "components/exo/surface_observer.h" |
| #include "components/exo/wm_helper.h" |
| -#include "ui/aura/client/focus_change_observer.h" |
| #include "ui/events/event_handler.h" |
| namespace ui { |
| @@ -20,17 +19,23 @@ class KeyEvent; |
| namespace exo { |
| class KeyboardDelegate; |
| +class KeyboardDeviceConfigurationDelegate; |
| class Surface; |
| // This class implements a client keyboard that represents one or more keyboard |
| // devices. |
| class Keyboard : public ui::EventHandler, |
| public WMHelper::FocusObserver, |
| + public WMHelper::InputDeviceEventObserver, |
| + public WMHelper::MaximizeModeObserver, |
| public SurfaceObserver { |
| public: |
| explicit Keyboard(KeyboardDelegate* delegate); |
| ~Keyboard() override; |
| + void SetKeyboardDeviceConfigurationDelegate( |
| + KeyboardDeviceConfigurationDelegate* delegate); |
| + |
| // Overridden from ui::EventHandler: |
| void OnKeyEvent(ui::KeyEvent* event) override; |
| @@ -41,13 +46,24 @@ class Keyboard : public ui::EventHandler, |
| // Overridden from SurfaceObserver: |
| void OnSurfaceDestroying(Surface* surface) override; |
| + // Overridden from ui::InputDeviceEventObserver: |
| + void OnKeyboardDeviceConfigurationChanged() override; |
| + |
| + // Overridden from WMHelper::MaximizeModeObserver: |
| + void OnMaximizeModeStarted() override; |
| + void OnMaximizeModeEnded() override; |
| + |
| private: |
| // Returns the effective focus for |window|. |
| Surface* GetEffectiveFocus(aura::Window* window) const; |
| - // The delegate instance that all events are dispatched to. |
| + // The delegate instance that all events of wl_keyboard are dispatched to. |
|
reveman
2016/12/09 00:18:37
we should not be referring to wayland interfaces i
yhanada
2016/12/09 14:54:04
Done.
|
| KeyboardDelegate* const delegate_; |
| + // The delegate instance that all events of zcr_keyboard_device_configuration |
|
reveman
2016/12/09 00:18:37
ditto. please avoid referring to wayland interface
yhanada
2016/12/09 14:54:04
Done.
|
| + // are dispatched to. |
| + KeyboardDeviceConfigurationDelegate* device_configuration_delegate_ = nullptr; |
| + |
| // The current focus surface for the keyboard. |
| Surface* focus_ = nullptr; |