| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |