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

Unified Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2880043002: Implement touch exploration touch typing (Closed)
Patch Set: Created 3 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
Index: ash/ash_touch_exploration_manager_chromeos.cc
diff --git a/ash/ash_touch_exploration_manager_chromeos.cc b/ash/ash_touch_exploration_manager_chromeos.cc
index c9ed8ac41cc1bfc801928343b082113e9702c0ca..09fc48d4576e8af9419a33a8a14dae45d8a68065 100644
--- a/ash/ash_touch_exploration_manager_chromeos.cc
+++ b/ash/ash_touch_exploration_manager_chromeos.cc
@@ -18,6 +18,7 @@
#include "chromeos/chromeos_switches.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/chromeos/touch_exploration_controller.h"
+#include "ui/keyboard/keyboard_controller.h"
#include "ui/wm/public/activation_client.h"
namespace ash {
@@ -142,6 +143,15 @@ void AshTouchExplorationManager::SetTouchAccessibilityAnchorPoint(
}
}
+void AshTouchExplorationManager::OnKeyboardBoundsChanging(
+ const gfx::Rect& new_bounds) {
+ UpdateTouchExplorationState();
+}
+
+void AshTouchExplorationManager::OnKeyboardClosed() {
+ UpdateTouchExplorationState();
+}
+
void AshTouchExplorationManager::UpdateTouchExplorationState() {
// See crbug.com/603745 for more details.
const bool pass_through_surface =
@@ -176,6 +186,17 @@ void AshTouchExplorationManager::UpdateTouchExplorationState() {
} else {
touch_exploration_controller_->SetExcludeBounds(gfx::Rect());
}
+
+ // Virtual keyboard.
+ keyboard::KeyboardController* keyboard_controller =
+ keyboard::KeyboardController::GetInstance();
+ if (keyboard_controller) {
+ if (!keyboard_controller->HasObserver(this))
+ keyboard_controller->AddObserver(this);
+
+ touch_exploration_controller_->SetLiftActivationBounds(
+ keyboard_controller->current_keyboard_bounds());
+ }
} else {
touch_exploration_controller_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698