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

Side by Side Diff: chrome/browser/ui/ash/chrome_keyboard_ui.cc

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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 | « chrome/browser/chromeos/accessibility/chromevox_panel.cc ('k') | no next file » | 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 "chrome/browser/ui/ash/chrome_keyboard_ui.h" 5 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 bool ChromeKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const { 195 bool ChromeKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const {
196 aura::Window* root_window = window->GetRootWindow(); 196 aura::Window* root_window = window->GetRootWindow();
197 if (!root_window) 197 if (!root_window)
198 return true; 198 return true;
199 199
200 if (root_window != GetKeyboardRootWindow()) 200 if (root_window != GetKeyboardRootWindow())
201 return false; 201 return false;
202 202
203 ash::RootWindowController* root_window_controller = 203 ash::RootWindowController* root_window_controller =
204 ash::GetRootWindowController(root_window); 204 ash::RootWindowController::ForWindow(root_window);
205 // Shell ime window container contains virtual keyboard windows and IME 205 // Shell ime window container contains virtual keyboard windows and IME
206 // windows(IME windows are created by chrome.app.window.create api). They 206 // windows(IME windows are created by chrome.app.window.create api). They
207 // should never be overscrolled. 207 // should never be overscrolled.
208 return !root_window_controller 208 return !root_window_controller
209 ->GetContainer(ash::kShellWindowId_ImeWindowParentContainer) 209 ->GetContainer(ash::kShellWindowId_ImeWindowParentContainer)
210 ->Contains(window); 210 ->Contains(window);
211 } 211 }
212 212
213 void ChromeKeyboardUI::SetUpdateInputType(ui::TextInputType type) { 213 void ChromeKeyboardUI::SetUpdateInputType(ui::TextInputType type) {
214 // TODO(bshe): Need to check the affected window's profile once multi-profile 214 // TODO(bshe): Need to check the affected window's profile once multi-profile
(...skipping 14 matching lines...) Expand all
229 TextInputTypeToGeneratedInputTypeEnum(type))); 229 TextInputTypeToGeneratedInputTypeEnum(type)));
230 event_args->Append(std::move(input_context)); 230 event_args->Append(std::move(input_context));
231 231
232 auto event = base::MakeUnique<extensions::Event>( 232 auto event = base::MakeUnique<extensions::Event>(
233 extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_TEXT_INPUT_BOX_FOCUSED, 233 extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_TEXT_INPUT_BOX_FOCUSED,
234 virtual_keyboard_private::OnTextInputBoxFocused::kEventName, 234 virtual_keyboard_private::OnTextInputBoxFocused::kEventName,
235 std::move(event_args), browser_context()); 235 std::move(event_args), browser_context());
236 router->DispatchEventToExtension(kVirtualKeyboardExtensionID, 236 router->DispatchEventToExtension(kVirtualKeyboardExtensionID,
237 std::move(event)); 237 std::move(event));
238 } 238 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/chromevox_panel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698