Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: ui/keyboard/keyboard_controller.h

Issue 368323002: Virtual Keyboard: Update insets on change to window bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.h
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 7bd8e2f87232bc4c28c158a27c7ba2a6c9d7f429..f0ae012e996244abfc9bf3b518972f2a969cda76 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -27,6 +27,7 @@ class TextInputClient;
namespace keyboard {
class CallbackAnimationObserver;
+class WindowBoundsChangeObserver;
class KeyboardControllerObserver;
class KeyboardControllerProxy;
@@ -98,6 +99,9 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
return current_keyboard_bounds_;
}
+ // Updates insets on web content window
+ void UpdateWindowInsets(aura::Window* window);
+
private:
// For access to Observer methods for simulation.
friend class KeyboardControllerTest;
@@ -133,12 +137,20 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
void ShowAnimationFinished();
void HideAnimationFinished();
+ // Adds or removes an observer for tracking changes to a window size or
+ // position while the keyboard is displayed. Any window repositioning
+ // invalidates insets for overscrolling.
+ void AddBoundsChangedObserver(aura::Window* window);
+ void RemoveBoundsChangedObserver(aura::Window* window);
+
scoped_ptr<KeyboardControllerProxy> proxy_;
scoped_ptr<aura::Window> container_;
// CallbackAnimationObserver should destructed before container_ because it
// uses container_'s animator.
scoped_ptr<CallbackAnimationObserver> animation_observer_;
+ scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_;
+
ui::InputMethod* input_method_;
bool keyboard_visible_;
bool lock_keyboard_;
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698