Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: ui/base/win/osk_display_manager.h

Issue 1986153005: The on screen keyboard on Windows 8+ should not obscure the input field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address sky unittest review comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/ui_base_tests.gyp ('k') | ui/base/win/osk_display_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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/weak_ptr.h"
9 #include "base/observer_list.h"
10 #include "base/strings/string16.h"
11 #include "ui/base/ui_base_export.h"
12 #include "ui/gfx/geometry/rect.h"
13
14 namespace ui {
15
16 class OnScreenKeyboardDetector;
17 class OnScreenKeyboardObserver;
18
19 // This class provides functionality to display the on screen keyboard on
20 // Windows 8+. It optionally notifies observers that the OSK is displayed,
21 // hidden, etc.
22 class UI_BASE_EXPORT OnScreenKeyboardDisplayManager {
23 public:
24 static OnScreenKeyboardDisplayManager* GetInstance();
25
26 ~OnScreenKeyboardDisplayManager();
27
28 // Functions to display and dismiss the keyboard.
29 // The optional |observer| parameter allows callers to be notified when the
30 // keyboard is displayed, dismissed, etc.
31 bool DisplayVirtualKeyboard(OnScreenKeyboardObserver* observer);
32 // When the keyboard is dismissed, the registered observer if any is removed
33 // after notifying it.
34 bool DismissVirtualKeyboard();
35
36 // Removes a registered observer.
37 void RemoveObserver(OnScreenKeyboardObserver* observer);
38
39 // Returns the path of the on screen keyboard exe (TabTip.exe) in the
40 // |osk_path| parameter.
41 // Returns true on success.
42 bool GetOSKPath(base::string16* osk_path);
43
44 private:
45 OnScreenKeyboardDisplayManager();
46
47 std::unique_ptr<OnScreenKeyboardDetector> keyboard_detector_;
48
49 // The location of TabTip.exe.
50 base::string16 osk_path_;
51
52 DISALLOW_COPY_AND_ASSIGN(OnScreenKeyboardDisplayManager);
53 };
54
55 } // namespace ui
56
57 #endif // UI_BASE_WIN_OSK_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/base/ui_base_tests.gyp ('k') | ui/base/win/osk_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698