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

Side by Side Diff: ui/keyboard/keyboard_controller.cc

Issue 341623002: Force resetting the VK insets when overscroll mode is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/keyboard/keyboard_controller.h" 5 #include "ui/keyboard/keyboard_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/public/browser/render_widget_host.h" 9 #include "content/public/browser/render_widget_host.h"
10 #include "content/public/browser/render_widget_host_iterator.h" 10 #include "content/public/browser/render_widget_host_iterator.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 int overlap = intersect.height(); 263 int overlap = intersect.height();
264 if (overlap > 0 && overlap < window_bounds.height()) 264 if (overlap > 0 && overlap < window_bounds.height())
265 view->SetInsets(gfx::Insets(0, 0, overlap, 0)); 265 view->SetInsets(gfx::Insets(0, 0, overlap, 0));
266 else 266 else
267 view->SetInsets(gfx::Insets(0, 0, 0, 0)); 267 view->SetInsets(gfx::Insets(0, 0, 0, 0));
268 // TODO(kevers): Add window observer to native window to update 268 // TODO(kevers): Add window observer to native window to update
269 // insets on a window move or resize. 269 // insets on a window move or resize.
270 } 270 }
271 } 271 }
272 } 272 }
273 } else {
274 ResetWindowInsets();
273 } 275 }
274 } 276 }
275 } 277 }
276 278
277 void KeyboardController::HideKeyboard(HideReason reason) { 279 void KeyboardController::HideKeyboard(HideReason reason) {
278 keyboard_visible_ = false; 280 keyboard_visible_ = false;
279 ToggleTouchEventLogging(true); 281 ToggleTouchEventLogging(true);
280 282
281 keyboard::LogKeyboardControlEvent( 283 keyboard::LogKeyboardControlEvent(
282 reason == HIDE_REASON_AUTOMATIC ? 284 reason == HIDE_REASON_AUTOMATIC ?
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // background during animation. 468 // background during animation.
467 NotifyKeyboardBoundsChanging(proxy_->GetKeyboardWindow()->bounds()); 469 NotifyKeyboardBoundsChanging(proxy_->GetKeyboardWindow()->bounds());
468 proxy_->EnsureCaretInWorkArea(); 470 proxy_->EnsureCaretInWorkArea();
469 } 471 }
470 472
471 void KeyboardController::HideAnimationFinished() { 473 void KeyboardController::HideAnimationFinished() {
472 proxy_->HideKeyboardContainer(container_.get()); 474 proxy_->HideKeyboardContainer(container_.get());
473 } 475 }
474 476
475 } // namespace keyboard 477 } // namespace keyboard
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698