| 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 "ui/aura/layout_manager.h" | 9 #include "ui/aura/layout_manager.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (input_method_) | 161 if (input_method_) |
| 162 input_method_->RemoveObserver(this); | 162 input_method_->RemoveObserver(this); |
| 163 } | 163 } |
| 164 | 164 |
| 165 aura::Window* KeyboardController::GetContainerWindow() { | 165 aura::Window* KeyboardController::GetContainerWindow() { |
| 166 if (!container_.get()) { | 166 if (!container_.get()) { |
| 167 container_.reset(new aura::Window( | 167 container_.reset(new aura::Window( |
| 168 new KeyboardWindowDelegate(proxy_.get()))); | 168 new KeyboardWindowDelegate(proxy_.get()))); |
| 169 container_->SetName("KeyboardContainer"); | 169 container_->SetName("KeyboardContainer"); |
| 170 container_->set_owned_by_parent(false); | 170 container_->set_owned_by_parent(false); |
| 171 container_->Init(ui::LAYER_NOT_DRAWN); | 171 container_->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
| 172 container_->AddObserver(this); | 172 container_->AddObserver(this); |
| 173 container_->SetLayoutManager(new KeyboardLayoutManager(this)); | 173 container_->SetLayoutManager(new KeyboardLayoutManager(this)); |
| 174 } | 174 } |
| 175 return container_.get(); | 175 return container_.get(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void KeyboardController::NotifyKeyboardBoundsChanging( | 178 void KeyboardController::NotifyKeyboardBoundsChanging( |
| 179 const gfx::Rect& new_bounds) { | 179 const gfx::Rect& new_bounds) { |
| 180 if (proxy_->GetKeyboardWindow()->IsVisible()) { | 180 if (proxy_->GetKeyboardWindow()->IsVisible()) { |
| 181 FOR_EACH_OBSERVER(KeyboardControllerObserver, | 181 FOR_EACH_OBSERVER(KeyboardControllerObserver, |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 const ui::InputMethod* input_method) { | 277 const ui::InputMethod* input_method) { |
| 278 DCHECK_EQ(input_method_, input_method); | 278 DCHECK_EQ(input_method_, input_method); |
| 279 input_method_ = NULL; | 279 input_method_ = NULL; |
| 280 } | 280 } |
| 281 | 281 |
| 282 bool KeyboardController::WillHideKeyboard() const { | 282 bool KeyboardController::WillHideKeyboard() const { |
| 283 return weak_factory_.HasWeakPtrs(); | 283 return weak_factory_.HasWeakPtrs(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace keyboard | 286 } // namespace keyboard |
| OLD | NEW |