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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bool keyboard_visible() { return keyboard_visible_; } | 97 bool keyboard_visible() { return keyboard_visible_; } |
98 | 98 |
99 bool show_on_resize() { return show_on_resize_; } | 99 bool show_on_resize() { return show_on_resize_; } |
100 | 100 |
101 // Returns the current keyboard bounds. When the keyboard is not shown, | 101 // Returns the current keyboard bounds. When the keyboard is not shown, |
102 // an empty rectangle will get returned. | 102 // an empty rectangle will get returned. |
103 const gfx::Rect& current_keyboard_bounds() { | 103 const gfx::Rect& current_keyboard_bounds() { |
104 return current_keyboard_bounds_; | 104 return current_keyboard_bounds_; |
105 } | 105 } |
106 | 106 |
| 107 // Determines whether a particular window should have insets for overscroll. |
| 108 bool ShouldEnableInsets(aura::Window* window); |
| 109 |
107 // Updates insets on web content window | 110 // Updates insets on web content window |
108 void UpdateWindowInsets(aura::Window* window); | 111 void UpdateWindowInsets(aura::Window* window); |
109 | 112 |
110 private: | 113 private: |
111 // For access to Observer methods for simulation. | 114 // For access to Observer methods for simulation. |
112 friend class KeyboardControllerTest; | 115 friend class KeyboardControllerTest; |
113 | 116 |
114 // aura::WindowObserver overrides | 117 // aura::WindowObserver overrides |
115 virtual void OnWindowHierarchyChanged( | 118 virtual void OnWindowHierarchyChanged( |
116 const HierarchyChangeParams& params) OVERRIDE; | 119 const HierarchyChangeParams& params) OVERRIDE; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 gfx::Rect current_keyboard_bounds_; | 172 gfx::Rect current_keyboard_bounds_; |
170 | 173 |
171 static KeyboardController* instance_; | 174 static KeyboardController* instance_; |
172 | 175 |
173 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 176 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
174 }; | 177 }; |
175 | 178 |
176 } // namespace keyboard | 179 } // namespace keyboard |
177 | 180 |
178 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 181 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
OLD | NEW |