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(); |
} |