Commit 00e3f38e authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Tell observers of ArcInputMethod bounds the removal of InputMethodSurface.

We need to tell the observers of ArcInputMethod bounds when the input
method surface is being removed.
Without doing that, the observers can't know whether the input method
surface is still there or not.

      device to clamshell mode.

Bug: 1042549
Test: manual - show Chrome OS VK on an ARC++ app and flipping back the
Change-Id: Ib3e8fed3aa24a856c016ebcf7d3f6af2b2e2e1d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2043186
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Auto-Submit: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739362}
parent 280300fc
......@@ -27,6 +27,9 @@ void ArcInputMethodSurfaceManager::RemoveSurface(
if (input_method_surface_ == surface)
input_method_surface_ = nullptr;
for (Observer& observer : observers_)
observer.OnArcInputMethodSurfaceBoundsChanged(gfx::Rect());
}
void ArcInputMethodSurfaceManager::OnTouchableBoundsChanged(
......
......@@ -94,6 +94,13 @@ TEST_F(ArcInputMethodSurfaceManagerTest, Observer) {
EXPECT_EQ(2, observer.bounds_changed_calls_);
EXPECT_EQ(gfx::Rect(), observer.last_bounds_);
// Drop InputMethodSurface should cause a bounds change call.
input_method_surface.reset();
EXPECT_EQ(3, observer.bounds_changed_calls_);
EXPECT_EQ(gfx::Rect(), observer.last_bounds_);
manager.RemoveObserver(&observer);
}
} // namespace ash
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment