Chromium Code Reviews| Index: ui/base/win/osk_display_manager.h |
| diff --git a/ui/base/win/osk_display_manager.h b/ui/base/win/osk_display_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..20cabcc42c7bc410ca23d12af88e0c74bb5c6d93 |
| --- /dev/null |
| +++ b/ui/base/win/osk_display_manager.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ |
| +#define UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "base/observer_list.h" |
| +#include "base/strings/string16.h" |
| +#include "ui/base/ui_base_export.h" |
| +#include "ui/gfx/geometry/rect.h" |
| + |
| +namespace ui { |
| + |
| +class OnScreenKeyboardDetector; |
| +class OnScreenKeyboardObserver; |
| + |
| +// This class provides functionality to display the on screen keyboard on |
| +// Windows 8+. It optionally notifies observers that the OSK is displayed, |
| +// hidden, etc. |
| +class UI_BASE_EXPORT OnScreenKeyboardDisplayManager { |
| + public: |
| + static OnScreenKeyboardDisplayManager* GetInstance(); |
| + |
| + ~OnScreenKeyboardDisplayManager(); |
| + |
| + // Functions to display and dismiss the keyboard. |
| + // The |observer| parameters allow the caller to optionally set up |
| + // notification observers for detecting when the keyboard is displayed |
| + // 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.
|
| + bool DisplayVirtualKeyboard(OnScreenKeyboardObserver* observer); |
| + bool DismissVirtualKeyboard(); |
| + |
| + private: |
| + OnScreenKeyboardDisplayManager(); |
| + |
| + friend struct base::DefaultSingletonTraits<OnScreenKeyboardDisplayManager>; |
| + |
| + std::unique_ptr<OnScreenKeyboardDetector> keyboard_detector_; |
| + |
| + // The location of TabTip.exe. |
| + base::string16 osk_path_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(OnScreenKeyboardDisplayManager); |
| +}; |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_ |