Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 // Sets the override content url. This is used by for input view for extension | 55 // Sets the override content url. This is used by for input view for extension |
| 56 // IMEs. | 56 // IMEs. |
| 57 void SetOverrideContentUrl(const GURL& url); | 57 void SetOverrideContentUrl(const GURL& url); |
| 58 | 58 |
| 59 // Hides virtual keyboard and notifies observer bounds change. | 59 // Hides virtual keyboard and notifies observer bounds change. |
| 60 // This function should be called with a delay to avoid layout flicker | 60 // This function should be called with a delay to avoid layout flicker |
| 61 // when the focus of input field quickly change. |automatic| is true when the | 61 // when the focus of input field quickly change. |automatic| is true when the |
| 62 // call is made by the system rather than initiated by the user. | 62 // call is made by the system rather than initiated by the user. |
| 63 void HideKeyboard(HideReason reason); | 63 void HideKeyboard(HideReason reason); |
| 64 | 64 |
| 65 // Notifies the keyboard observer for keyboard bounds changed. | |
| 66 void NotifyKeyboardBoundsChanged( | |
| 67 const gfx::Rect& new_bounds, bool force = false); | |
|
kevers
2013/12/03 00:08:12
Default argument values are not allowed in the sty
Shu Chen
2013/12/03 01:54:42
Done.
| |
| 68 | |
| 65 // Management of the observer list. | 69 // Management of the observer list. |
| 66 virtual void AddObserver(KeyboardControllerObserver* observer); | 70 virtual void AddObserver(KeyboardControllerObserver* observer); |
| 67 virtual void RemoveObserver(KeyboardControllerObserver* observer); | 71 virtual void RemoveObserver(KeyboardControllerObserver* observer); |
| 68 | 72 |
| 69 private: | 73 private: |
| 70 // For access to Observer methods for simulation. | 74 // For access to Observer methods for simulation. |
| 71 friend class KeyboardControllerTest; | 75 friend class KeyboardControllerTest; |
| 72 | 76 |
| 73 // aura::WindowObserver overrides | 77 // aura::WindowObserver overrides |
| 74 virtual void OnWindowHierarchyChanged( | 78 virtual void OnWindowHierarchyChanged( |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 97 ObserverList<KeyboardControllerObserver> observer_list_; | 101 ObserverList<KeyboardControllerObserver> observer_list_; |
| 98 | 102 |
| 99 base::WeakPtrFactory<KeyboardController> weak_factory_; | 103 base::WeakPtrFactory<KeyboardController> weak_factory_; |
| 100 | 104 |
| 101 DISALLOW_COPY_AND_ASSIGN(KeyboardController); | 105 DISALLOW_COPY_AND_ASSIGN(KeyboardController); |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 } // namespace keyboard | 108 } // namespace keyboard |
| 105 | 109 |
| 106 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ | 110 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |