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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 window->RemoveObserver(this); | 221 window->RemoveObserver(this); |
222 } | 222 } |
223 | 223 |
224 // static | 224 // static |
225 KeyboardController* KeyboardController::instance_ = NULL; | 225 KeyboardController* KeyboardController::instance_ = NULL; |
226 | 226 |
227 KeyboardController::KeyboardController(KeyboardControllerProxy* proxy) | 227 KeyboardController::KeyboardController(KeyboardControllerProxy* proxy) |
228 : proxy_(proxy), | 228 : proxy_(proxy), |
229 input_method_(NULL), | 229 input_method_(NULL), |
230 keyboard_visible_(false), | 230 keyboard_visible_(false), |
| 231 show_on_resize_(false), |
231 lock_keyboard_(false), | 232 lock_keyboard_(false), |
232 type_(ui::TEXT_INPUT_TYPE_NONE), | 233 type_(ui::TEXT_INPUT_TYPE_NONE), |
233 weak_factory_(this) { | 234 weak_factory_(this) { |
234 CHECK(proxy); | 235 CHECK(proxy); |
235 input_method_ = proxy_->GetInputMethod(); | 236 input_method_ = proxy_->GetInputMethod(); |
236 input_method_->AddObserver(this); | 237 input_method_->AddObserver(this); |
237 window_bounds_observer_.reset(new WindowBoundsChangeObserver()); | 238 window_bounds_observer_.reset(new WindowBoundsChangeObserver()); |
238 } | 239 } |
239 | 240 |
240 KeyboardController::~KeyboardController() { | 241 KeyboardController::~KeyboardController() { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 566 |
566 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) { | 567 void KeyboardController::RemoveBoundsChangedObserver(aura::Window* window) { |
567 aura::Window* target_window = GetFrameWindow(window); | 568 aura::Window* target_window = GetFrameWindow(window); |
568 if (target_window && | 569 if (target_window && |
569 target_window->HasObserver(window_bounds_observer_.get())) { | 570 target_window->HasObserver(window_bounds_observer_.get())) { |
570 target_window->RemoveObserver(window_bounds_observer_.get()); | 571 target_window->RemoveObserver(window_bounds_observer_.get()); |
571 } | 572 } |
572 } | 573 } |
573 | 574 |
574 } // namespace keyboard | 575 } // namespace keyboard |
OLD | NEW |