| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 static void ResetInstance(KeyboardController* controller); | 110 static void ResetInstance(KeyboardController* controller); |
| 111 | 111 |
| 112 // Retrieve the active keyboard controller. | 112 // Retrieve the active keyboard controller. |
| 113 static KeyboardController* GetInstance(); | 113 static KeyboardController* GetInstance(); |
| 114 | 114 |
| 115 // Returns true if keyboard is currently visible. | 115 // Returns true if keyboard is currently visible. |
| 116 bool keyboard_visible() { return keyboard_visible_; } | 116 bool keyboard_visible() { return keyboard_visible_; } |
| 117 | 117 |
| 118 bool show_on_resize() { return show_on_resize_; } | 118 bool show_on_resize() { return show_on_resize_; } |
| 119 | 119 |
| 120 // Returns true if keyboard window has been created. |
| 121 bool IsKeyboardWindowCreated(); |
| 122 |
| 120 // Returns the current keyboard bounds. An empty rectangle will get returned | 123 // Returns the current keyboard bounds. An empty rectangle will get returned |
| 121 // when the keyboard is not shown or in FLOATING mode. | 124 // when the keyboard is not shown or in FLOATING mode. |
| 122 const gfx::Rect& current_keyboard_bounds() { | 125 const gfx::Rect& current_keyboard_bounds() { |
| 123 return current_keyboard_bounds_; | 126 return current_keyboard_bounds_; |
| 124 } | 127 } |
| 125 | 128 |
| 126 private: | 129 private: |
| 127 // For access to Observer methods for simulation. | 130 // For access to Observer methods for simulation. |
| 128 friend class KeyboardControllerTest; | 131 friend class KeyboardControllerTest; |
| 129 | 132 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 static KeyboardController* instance_; | 182 static KeyboardController* instance_; |
| 180 | 183 |
| 181 base::WeakPtrFactory<KeyboardController> weak_factory_; | 184 base::WeakPtrFactory<KeyboardController> weak_factory_; |
| 182 | 185 |
| 183 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 186 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
| 184 }; | 187 }; |
| 185 | 188 |
| 186 } // namespace keyboard | 189 } // namespace keyboard |
| 187 | 190 |
| 188 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 191 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |