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

Unified Diff: ui/keyboard/keyboard_controller.h

Issue 2445293002: Make the virtual keyboard show up on the display with input focus. (Closed)
Patch Set: fix one more compilation error on Windows Created 4 years, 1 month 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/keyboard/DEPS ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.h
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 7e59feea65ea1c5d83c431b7876eab0c2f7792b3..2ca8880b4b30d7b4bad60a0b2dd28682d0b84e6a 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -15,6 +15,7 @@
#include "ui/base/ime/text_input_type.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/keyboard/keyboard_export.h"
+#include "ui/keyboard/keyboard_layout_delegate.h"
namespace aura {
class Window;
@@ -58,7 +59,7 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
};
// Takes ownership of |ui|.
- explicit KeyboardController(KeyboardUI* ui);
+ explicit KeyboardController(KeyboardUI* ui, KeyboardLayoutDelegate* delegate);
~KeyboardController() override;
// Returns the container for the keyboard, which is owned by
@@ -87,9 +88,9 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
KeyboardUI* ui() { return ui_.get(); }
- void set_lock_keyboard(bool lock) { lock_keyboard_ = lock; }
+ void set_keyboard_locked(bool lock) { keyboard_locked_ = lock; }
- bool get_lock_keyboard() const { return lock_keyboard_; }
+ bool keyboard_locked() const { return keyboard_locked_; }
KeyboardMode keyboard_mode() const { return keyboard_mode_; }
@@ -99,6 +100,10 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
// |lock| is true.
void ShowKeyboard(bool lock);
+ // Force the keyboard to show up in the specific display if not showing and
+ // lock the keyboard
+ void ShowKeyboardInDisplay(const int64_t display_id);
+
// Sets the active keyboard controller. KeyboardController takes ownership of
// the instance. Calling ResetIntance with a new instance destroys the
// previous one. May be called with NULL to clear the instance.
@@ -141,7 +146,7 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
void OnShowImeIfNeeded() override;
// Show virtual keyboard immediately with animation.
- void ShowKeyboardInternal();
+ void ShowKeyboardInternal(int64_t display_id);
// Returns true if keyboard is scheduled to hide.
bool WillHideKeyboard() const;
@@ -152,6 +157,7 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
void HideAnimationFinished();
std::unique_ptr<KeyboardUI> ui_;
+ KeyboardLayoutDelegate* layout_delegate_;
std::unique_ptr<aura::Window> container_;
// CallbackAnimationObserver should destructed before container_ because it
// uses container_'s animator.
@@ -160,7 +166,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
ui::InputMethod* input_method_;
bool keyboard_visible_;
bool show_on_resize_;
- bool lock_keyboard_;
+ // If true, the keyboard is always visible even if no window has input focus.
+ bool keyboard_locked_;
KeyboardMode keyboard_mode_;
ui::TextInputType type_;
« no previous file with comments | « ui/keyboard/DEPS ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698