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/event_types.h" | 9 #include "base/event_types.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 void ResetWindowInsets(); | 132 void ResetWindowInsets(); |
133 | 133 |
134 // Returns true if keyboard is scheduled to hide. | 134 // Returns true if keyboard is scheduled to hide. |
135 bool WillHideKeyboard() const; | 135 bool WillHideKeyboard() const; |
136 | 136 |
137 // Called when show and hide animation finished successfully. If the animation | 137 // Called when show and hide animation finished successfully. If the animation |
138 // is aborted, it won't be called. | 138 // is aborted, it won't be called. |
139 void ShowAnimationFinished(); | 139 void ShowAnimationFinished(); |
140 void HideAnimationFinished(); | 140 void HideAnimationFinished(); |
141 | 141 |
142 // Adds or removes an observer for tracking changes to a window size or | 142 // Adds an observer for tracking changes to a window size or |
143 // position while the keyboard is displayed. Any window repositioning | 143 // position while the keyboard is displayed. Any window repositioning |
144 // invalidates insets for overscrolling. | 144 // invalidates insets for overscrolling. |
145 void AddBoundsChangedObserver(aura::Window* window); | 145 void AddBoundsChangedObserver(aura::Window* window); |
146 void RemoveBoundsChangedObserver(aura::Window* window); | |
147 | 146 |
148 scoped_ptr<KeyboardControllerProxy> proxy_; | 147 scoped_ptr<KeyboardControllerProxy> proxy_; |
149 scoped_ptr<aura::Window> container_; | 148 scoped_ptr<aura::Window> container_; |
150 // CallbackAnimationObserver should destructed before container_ because it | 149 // CallbackAnimationObserver should destructed before container_ because it |
151 // uses container_'s animator. | 150 // uses container_'s animator. |
152 scoped_ptr<CallbackAnimationObserver> animation_observer_; | 151 scoped_ptr<CallbackAnimationObserver> animation_observer_; |
153 | 152 |
154 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_; | 153 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_; |
155 | 154 |
156 ui::InputMethod* input_method_; | 155 ui::InputMethod* input_method_; |
(...skipping 10 matching lines...) Expand all Loading... |
167 gfx::Rect current_keyboard_bounds_; | 166 gfx::Rect current_keyboard_bounds_; |
168 | 167 |
169 static KeyboardController* instance_; | 168 static KeyboardController* instance_; |
170 | 169 |
171 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 170 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
172 }; | 171 }; |
173 | 172 |
174 } // namespace keyboard | 173 } // namespace keyboard |
175 | 174 |
176 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 175 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
OLD | NEW |