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" | |
| 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 |observer| parameters allow the caller to optionally set up | |
| 31 // notification observers for detecting when the keyboard is displayed | |
| 32 // hidden etc. | |
|
grt (UTC plus 2)
2016/05/20 14:56:35
it looks like the observer is automagically remove
ananta
2016/05/20 19:32:55
Done.
| |
| 33 bool DisplayVirtualKeyboard(OnScreenKeyboardObserver* observer); | |
| 34 bool DismissVirtualKeyboard(); | |
| 35 | |
| 36 private: | |
| 37 OnScreenKeyboardDisplayManager(); | |
| 38 | |
| 39 friend struct base::DefaultSingletonTraits<OnScreenKeyboardDisplayManager>; | |
| 40 | |
| 41 std::unique_ptr<OnScreenKeyboardDetector> keyboard_detector_; | |
| 42 | |
| 43 // The location of TabTip.exe. | |
| 44 base::string16 osk_path_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(OnScreenKeyboardDisplayManager); | |
| 47 }; | |
| 48 | |
| 49 } // namespace ui | |
| 50 | |
| 51 #endif // UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ | |
| OLD | NEW |