| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/wm/workspace/workspace_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 wm::SetBoundsEvent event(wm::WM_EVENT_SET_BOUNDS, requested_bounds); | 127 wm::SetBoundsEvent event(wm::WM_EVENT_SET_BOUNDS, requested_bounds); |
| 128 window_state->OnWMEvent(&event); | 128 window_state->OnWMEvent(&event); |
| 129 UpdateShelfVisibility(); | 129 UpdateShelfVisibility(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 ////////////////////////////////////////////////////////////////////////////// | 132 ////////////////////////////////////////////////////////////////////////////// |
| 133 // WorkspaceLayoutManager, keyboard::KeyboardControllerObserver implementation: | 133 // WorkspaceLayoutManager, keyboard::KeyboardControllerObserver implementation: |
| 134 | 134 |
| 135 void WorkspaceLayoutManager::OnKeyboardBoundsChanging( | 135 void WorkspaceLayoutManager::OnKeyboardBoundsChanging( |
| 136 const gfx::Rect& new_bounds) { | 136 const gfx::Rect& new_bounds) { |
| 137 ui::InputMethod* input_method = | 137 ui::InputMethod* input_method = root_window_->GetHost()->GetInputMethod(); |
| 138 root_window_->GetProperty(aura::client::kRootWindowInputMethodKey); | |
| 139 ui::TextInputClient* text_input_client = input_method->GetTextInputClient(); | 138 ui::TextInputClient* text_input_client = input_method->GetTextInputClient(); |
| 140 if (!text_input_client) | 139 if (!text_input_client) |
| 141 return; | 140 return; |
| 142 aura::Window *window = | 141 aura::Window *window = |
| 143 text_input_client->GetAttachedWindow()->GetToplevelWindow(); | 142 text_input_client->GetAttachedWindow()->GetToplevelWindow(); |
| 144 if (!window || !window_->Contains(window)) | 143 if (!window || !window_->Contains(window)) |
| 145 return; | 144 return; |
| 146 wm::WindowState* window_state = wm::GetWindowState(window); | 145 wm::WindowState* window_state = wm::GetWindowState(window); |
| 147 if (!new_bounds.IsEmpty()) { | 146 if (!new_bounds.IsEmpty()) { |
| 148 // Store existing bounds to be restored before resizing for keyboard if it | 147 // Store existing bounds to be restored before resizing for keyboard if it |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 bool is_fullscreen = GetRootWindowController( | 321 bool is_fullscreen = GetRootWindowController( |
| 323 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; | 322 window_->GetRootWindow())->GetWindowForFullscreenMode() != NULL; |
| 324 if (is_fullscreen != is_fullscreen_) { | 323 if (is_fullscreen != is_fullscreen_) { |
| 325 ash::Shell::GetInstance()->NotifyFullscreenStateChange( | 324 ash::Shell::GetInstance()->NotifyFullscreenStateChange( |
| 326 is_fullscreen, window_->GetRootWindow()); | 325 is_fullscreen, window_->GetRootWindow()); |
| 327 is_fullscreen_ = is_fullscreen; | 326 is_fullscreen_ = is_fullscreen; |
| 328 } | 327 } |
| 329 } | 328 } |
| 330 | 329 |
| 331 } // namespace ash | 330 } // namespace ash |
| OLD | NEW |