Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ | |
| 6 #define UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ | |
| 7 | |
| 8 #include "base/memory/singleton.h" | |
|
grt (UTC plus 2)
2016/05/24 18:22:34
unused
ananta
2016/05/24 20:42:39
Done.
| |
| 9 #include "base/memory/weak_ptr.h" | |
| 10 #include "base/observer_list.h" | |
| 11 #include "base/strings/string16.h" | |
| 12 #include "ui/base/ui_base_export.h" | |
| 13 #include "ui/gfx/geometry/rect.h" | |
| 14 | |
| 15 namespace ui { | |
| 16 | |
| 17 class OnScreenKeyboardDetector; | |
| 18 class OnScreenKeyboardObserver; | |
| 19 | |
| 20 // This class provides functionality to display the on screen keyboard on | |
| 21 // Windows 8+. It optionally notifies observers that the OSK is displayed, | |
| 22 // hidden, etc. | |
| 23 class UI_BASE_EXPORT OnScreenKeyboardDisplayManager { | |
| 24 public: | |
| 25 static OnScreenKeyboardDisplayManager* GetInstance(); | |
| 26 | |
| 27 ~OnScreenKeyboardDisplayManager(); | |
| 28 | |
| 29 // Functions to display and dismiss the keyboard. | |
| 30 // The optional |observer| parameter allows callers to be notified when the | |
| 31 // keyboard is displayed, dismissed, etc. | |
| 32 bool DisplayVirtualKeyboard(OnScreenKeyboardObserver* observer); | |
| 33 // When the keyboard is dismissed, the registered observer if any is removed | |
| 34 // after notifying it. | |
| 35 bool DismissVirtualKeyboard(); | |
| 36 | |
| 37 // Removes a registered observer. | |
| 38 void RemoveObserver(OnScreenKeyboardObserver* observer); | |
| 39 | |
| 40 private: | |
| 41 OnScreenKeyboardDisplayManager(); | |
| 42 | |
| 43 friend struct base::DefaultSingletonTraits<OnScreenKeyboardDisplayManager>; | |
|
grt (UTC plus 2)
2016/05/24 18:22:34
unused
ananta
2016/05/24 20:42:39
Done.
| |
| 44 | |
| 45 std::unique_ptr<OnScreenKeyboardDetector> keyboard_detector_; | |
| 46 | |
| 47 // The location of TabTip.exe. | |
| 48 base::string16 osk_path_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(OnScreenKeyboardDisplayManager); | |
| 51 }; | |
| 52 | |
| 53 } // namespace ui | |
| 54 | |
| 55 #endif // UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ | |
| OLD | NEW |