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_UTIL_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_UTIL_H_ |
6 #define UI_KEYBOARD_KEYBOARD_UTIL_H_ | 6 #define UI_KEYBOARD_KEYBOARD_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 KEYBOARD_CONTROL_SHOW = 0, | 35 KEYBOARD_CONTROL_SHOW = 0, |
36 KEYBOARD_CONTROL_HIDE_AUTO, | 36 KEYBOARD_CONTROL_HIDE_AUTO, |
37 KEYBOARD_CONTROL_HIDE_USER, | 37 KEYBOARD_CONTROL_HIDE_USER, |
38 KEYBOARD_CONTROL_MAX, | 38 KEYBOARD_CONTROL_MAX, |
39 }; | 39 }; |
40 | 40 |
41 // Gets the default keyboard bounds from |window_bounds|. | 41 // Gets the default keyboard bounds from |window_bounds|. |
42 KEYBOARD_EXPORT gfx::Rect DefaultKeyboardBoundsFromWindowBounds( | 42 KEYBOARD_EXPORT gfx::Rect DefaultKeyboardBoundsFromWindowBounds( |
43 const gfx::Rect& window_bounds); | 43 const gfx::Rect& window_bounds); |
44 | 44 |
| 45 // Gets the caculated keyboard bounds from |window_bounds|. The keyboard height |
| 46 // is specified by |keyboard_height|. |
| 47 KEYBOARD_EXPORT gfx::Rect KeyboardBoundsFromWindowBounds( |
| 48 const gfx::Rect& window_bounds, int keyboard_height); |
| 49 |
45 // Sets the state of the a11y onscreen keyboard. | 50 // Sets the state of the a11y onscreen keyboard. |
46 KEYBOARD_EXPORT void SetAccessibilityKeyboardEnabled(bool enabled); | 51 KEYBOARD_EXPORT void SetAccessibilityKeyboardEnabled(bool enabled); |
47 | 52 |
48 // Gets the state of the a11y onscreen keyboard. | 53 // Gets the state of the a11y onscreen keyboard. |
49 KEYBOARD_EXPORT bool GetAccessibilityKeyboardEnabled(); | 54 KEYBOARD_EXPORT bool GetAccessibilityKeyboardEnabled(); |
50 | 55 |
51 // Sets the state of the touch onscreen keyboard. | 56 // Sets the state of the touch onscreen keyboard. |
52 KEYBOARD_EXPORT void SetTouchKeyboardEnabled(bool enabled); | 57 KEYBOARD_EXPORT void SetTouchKeyboardEnabled(bool enabled); |
53 | 58 |
54 // Gets the state of the touch onscreen keyboard. | 59 // Gets the state of the touch onscreen keyboard. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 118 |
114 // Gets the override content url. | 119 // Gets the override content url. |
115 KEYBOARD_EXPORT const GURL& GetOverrideContentUrl(); | 120 KEYBOARD_EXPORT const GURL& GetOverrideContentUrl(); |
116 | 121 |
117 // Logs the keyboard control event as a UMA stat. | 122 // Logs the keyboard control event as a UMA stat. |
118 void LogKeyboardControlEvent(KeyboardControlEvent event); | 123 void LogKeyboardControlEvent(KeyboardControlEvent event); |
119 | 124 |
120 } // namespace keyboard | 125 } // namespace keyboard |
121 | 126 |
122 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ | 127 #endif // UI_KEYBOARD_KEYBOARD_UTIL_H_ |
OLD | NEW |