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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 2692983006: Remove an unnecessary field in KeyboardController. (Closed)
Patch Set: rebase Created 3 years, 10 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/keyboard/keyboard_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 86e3822eeca8f44547935865316751e53b6cf9c4..676da64d047e71106edad66bed6ce9436923b5f1 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -175,7 +175,6 @@ KeyboardController::KeyboardController(KeyboardUI* ui,
show_on_resize_(false),
keyboard_locked_(false),
keyboard_mode_(FULL_WIDTH),
- type_(ui::TEXT_INPUT_TYPE_NONE),
weak_factory_(this) {
CHECK(ui);
input_method_ = ui_->GetInputMethod();
@@ -365,9 +364,10 @@ void KeyboardController::OnTextInputStateChanged(
if (!container_.get())
return;
- type_ = client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
+ ui::TextInputType type =
+ client ? client->GetTextInputType() : ui::TEXT_INPUT_TYPE_NONE;
- if (type_ == ui::TEXT_INPUT_TYPE_NONE && !keyboard_locked_) {
+ if (type == ui::TEXT_INPUT_TYPE_NONE && !keyboard_locked_) {
if (keyboard_visible_) {
// Set the visibility state here so that any queries for visibility
// before the timer fires returns the correct future value.
@@ -384,7 +384,7 @@ void KeyboardController::OnTextInputStateChanged(
weak_factory_.InvalidateWeakPtrs();
keyboard_visible_ = true;
}
- ui_->SetUpdateInputType(type_);
+ ui_->SetUpdateInputType(type);
// Do not explicitly show the Virtual keyboard unless it is in the process
// of hiding. Instead, the virtual keyboard is shown in response to a user
// gesture (mouse or touch) that is received while an element has input
« no previous file with comments | « ui/keyboard/keyboard_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698