OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 public aura::WindowObserver { | 35 public aura::WindowObserver { |
36 public: | 36 public: |
37 // Takes ownership of |proxy|. | 37 // Takes ownership of |proxy|. |
38 explicit KeyboardController(KeyboardControllerProxy* proxy); | 38 explicit KeyboardController(KeyboardControllerProxy* proxy); |
39 virtual ~KeyboardController(); | 39 virtual ~KeyboardController(); |
40 | 40 |
41 // Returns the container for the keyboard, which is then owned by the caller. | 41 // Returns the container for the keyboard, which is then owned by the caller. |
42 // It is the responsibility of the caller to Show() the returned window. | 42 // It is the responsibility of the caller to Show() the returned window. |
43 aura::Window* GetContainerWindow(); | 43 aura::Window* GetContainerWindow(); |
44 | 44 |
| 45 // Force the visibility of the virtual keyboard. |
| 46 void SetKeyboardVisibility(bool should_show); |
| 47 |
45 // Management of the observer list. | 48 // Management of the observer list. |
46 virtual void AddObserver(KeyboardControllerObserver* observer); | 49 virtual void AddObserver(KeyboardControllerObserver* observer); |
47 virtual void RemoveObserver(KeyboardControllerObserver* observer); | 50 virtual void RemoveObserver(KeyboardControllerObserver* observer); |
48 | 51 |
49 private: | 52 private: |
50 // For access to Observer methods for simulation. | 53 // For access to Observer methods for simulation. |
51 friend class KeyboardControllerTest; | 54 friend class KeyboardControllerTest; |
52 | 55 |
53 // aura::WindowObserver overrides | 56 // aura::WindowObserver overrides |
54 virtual void OnWindowParentChanged(aura::Window* window, | 57 virtual void OnWindowParentChanged(aura::Window* window, |
(...skipping 11 matching lines...) Expand all Loading... |
66 ui::InputMethod* input_method_; | 69 ui::InputMethod* input_method_; |
67 | 70 |
68 ObserverList<KeyboardControllerObserver> observer_list_; | 71 ObserverList<KeyboardControllerObserver> observer_list_; |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 73 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
71 }; | 74 }; |
72 | 75 |
73 } // namespace keyboard | 76 } // namespace keyboard |
74 | 77 |
75 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 78 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
OLD | NEW |