keyboard_layout_manager.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2014 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. #ifndef ASH_KEYBOARD_UI_KEYBOARD_LAYOUT_MANAGER_H_
  5. #define ASH_KEYBOARD_UI_KEYBOARD_LAYOUT_MANAGER_H_
  6. #include "ash/keyboard/ui/keyboard_export.h"
  7. #include "ui/aura/layout_manager.h"
  8. #include "ui/aura/window.h"
  9. namespace keyboard {
  10. class KeyboardUIController;
  11. // LayoutManager for the virtual keyboard container. Manages a single window
  12. // (the virtual keyboard) and keeps it positioned at the bottom of the
  13. // owner window.
  14. class KEYBOARD_EXPORT KeyboardLayoutManager : public aura::LayoutManager {
  15. public:
  16. explicit KeyboardLayoutManager(KeyboardUIController* controller);
  17. KeyboardLayoutManager(const KeyboardLayoutManager&) = delete;
  18. KeyboardLayoutManager& operator=(const KeyboardLayoutManager&) = delete;
  19. ~KeyboardLayoutManager() override;
  20. // Overridden from aura::LayoutManager
  21. void OnWindowResized() override {}
  22. void OnWindowAddedToLayout(aura::Window* child) override;
  23. void OnWillRemoveWindowFromLayout(aura::Window* child) override {}
  24. void OnWindowRemovedFromLayout(aura::Window* child) override {}
  25. void OnChildWindowVisibilityChanged(aura::Window* child,
  26. bool visible) override {}
  27. void SetChildBounds(aura::Window* child,
  28. const gfx::Rect& requested_bounds) override;
  29. private:
  30. KeyboardUIController* controller_;
  31. };
  32. } // namespace keyboard
  33. #endif // ASH_KEYBOARD_UI_KEYBOARD_LAYOUT_MANAGER_H_