[VK] Simplify KeyboardController::SetDraggableArea.
|SetDraggableArea| returns checks if the container behavior is null,
but KeyboardController always has a container behavior (initialised in
the constructor).
This patch removes the container behavior null check.
Bug: 845780
Change-Id: Iaa21bd8179a7fb88a0dd277f4888ae778c624d99
Reviewed-on: https://chromium-review.googlesource.com/1069950
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560995}
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index a1f53a0..54b6ede 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -848,10 +848,7 @@
}
bool KeyboardController::SetDraggableArea(const gfx::Rect& rect) {
- if (container_behavior_) {
- return container_behavior_->SetDraggableArea(rect);
- }
- return false;
+ return container_behavior_->SetDraggableArea(rect);
}
bool KeyboardController::DisplayVirtualKeyboard() {
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index 0bae4f5..a0629b0 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -190,7 +190,7 @@
base::Optional<gfx::Rect> target_bounds,
base::OnceCallback<void(bool)> callback);
- // Sets floating keyboard drggable rect.
+ // Sets floating keyboard draggable rect.
bool SetDraggableArea(const gfx::Rect& rect);
void MoveToDisplayWithTransition(display::Display display,