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

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

Issue 528043002: Fix stale keyboard bounds on login screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ash/wm/lock_window_state.cc ('k') | ui/keyboard/keyboard_layout_manager.cc » ('j') | 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 view->SetInsets(gfx::Insets(0, 0, overlap, 0)); 298 view->SetInsets(gfx::Insets(0, 0, overlap, 0));
299 else 299 else
300 view->SetInsets(gfx::Insets()); 300 view->SetInsets(gfx::Insets());
301 AddBoundsChangedObserver(window); 301 AddBoundsChangedObserver(window);
302 } 302 }
303 } 303 }
304 } 304 }
305 } else { 305 } else {
306 ResetWindowInsets(); 306 ResetWindowInsets();
307 } 307 }
308 } else {
309 current_keyboard_bounds_ = gfx::Rect();
308 } 310 }
309 } 311 }
310 312
311 void KeyboardController::HideKeyboard(HideReason reason) { 313 void KeyboardController::HideKeyboard(HideReason reason) {
312 keyboard_visible_ = false; 314 keyboard_visible_ = false;
313 ToggleTouchEventLogging(true); 315 ToggleTouchEventLogging(true);
314 316
315 keyboard::LogKeyboardControlEvent( 317 keyboard::LogKeyboardControlEvent(
316 reason == HIDE_REASON_AUTOMATIC ? 318 reason == HIDE_REASON_AUTOMATIC ?
317 keyboard::KEYBOARD_CONTROL_HIDE_AUTO : 319 keyboard::KEYBOARD_CONTROL_HIDE_AUTO :
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 548
547 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) { 549 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) {
548 aura::Window* target_window = GetFrameWindow(window); 550 aura::Window* target_window = GetFrameWindow(window);
549 if (target_window && 551 if (target_window &&
550 target_window->HasObserver(window_bounds_observer_.get())) { 552 target_window->HasObserver(window_bounds_observer_.get())) {
551 target_window->RemoveObserver(window_bounds_observer_.get()); 553 target_window->RemoveObserver(window_bounds_observer_.get());
552 } 554 }
553 } 555 }
554 556
555 } // namespace keyboard 557 } // namespace keyboard
OLDNEW
« no previous file with comments | « ash/wm/lock_window_state.cc ('k') | ui/keyboard/keyboard_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698