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

Unified Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2880043002: Implement touch exploration touch typing (Closed)
Patch Set: Nits. 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
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.h ('k') | ui/chromeos/touch_exploration_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6120ffbf4de19d4c49fe0ea4118585cf05818dad..8508790dc9056332e7e809c169cb18e6bc172579 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);
oshima 2017/05/25 23:31:58 don't you have to remove it later?
Daniel Erat 2017/05/25 23:54:11 base::ScopedObserver is a good way to avoid bugs l
David Tseng 2017/05/26 16:05:15 Done.
+
+ touch_exploration_controller_->SetLiftActivationBounds(
+ keyboard_controller->current_keyboard_bounds());
+ }
} else {
touch_exploration_controller_.reset();
}
« no previous file with comments | « ash/ash_touch_exploration_manager_chromeos.h ('k') | ui/chromeos/touch_exploration_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698