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
5#ifndef UI_KEYBOARD_KEYBOARD_LAYOUT_MANAGER_H_
6#define UI_KEYBOARD_KEYBOARD_LAYOUT_MANAGER_H_
7
8#include "ui/aura/layout_manager.h"
9#include "ui/aura/window.h"
10
11namespace keyboard {
12
13class KeyboardController;
14
15// LayoutManager for the virtual keyboard container. Manages a single window
16// (the virtual keyboard) and keeps it positioned at the bottom of the
17// owner window.
18class KeyboardLayoutManager : public aura::LayoutManager {
19 public:
20  explicit KeyboardLayoutManager(KeyboardController* controller)
21      : controller_(controller), keyboard_(NULL) {
22  }
23
24  // Overridden from aura::LayoutManager
25  virtual void OnWindowResized() OVERRIDE;
26  virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
27  virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE {}
28  virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE {}
29  virtual void OnChildWindowVisibilityChanged(aura::Window* child,
30                                              bool visible) OVERRIDE {}
31  virtual void SetChildBounds(aura::Window* child,
32                              const gfx::Rect& requested_bounds) OVERRIDE;
33
34 private:
35  KeyboardController* controller_;
36  aura::Window* keyboard_;
37
38  DISALLOW_COPY_AND_ASSIGN(KeyboardLayoutManager);
39};
40
41}  // namespace keyboard
42
43#endif  // UI_KEYBOARD_KEYBOARD_LAYOUT_MANAGER_H_
44