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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..111111fe92d7680fa80c756900657b1d5e461d6a
--- /dev/null
+++ b/ui/base/win/osk_display_manager.h
@@ -0,0 +1,57 @@
+// 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/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 optional |observer| parameter allows callers to be notified when the
+ // keyboard is displayed, dismissed, etc.
+ bool DisplayVirtualKeyboard(OnScreenKeyboardObserver* observer);
+ // When the keyboard is dismissed, the registered observer if any is removed
+ // after notifying it.
+ bool DismissVirtualKeyboard();
+
+ // Removes a registered observer.
+ void RemoveObserver(OnScreenKeyboardObserver* observer);
+
+ // Returns the path of the on screen keyboard exe (TabTip.exe) in the
+ // |osk_path| parameter.
+ // Returns true on success.
+ bool GetOSKPath(base::string16* osk_path);
+
+ private:
+ 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_
« 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