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

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

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: Created 3 years, 9 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } // namespace 131 } // namespace
132 132
133 ChromeKeyboardUI::ChromeKeyboardUI(content::BrowserContext* context) 133 ChromeKeyboardUI::ChromeKeyboardUI(content::BrowserContext* context)
134 : keyboard::KeyboardUIContent(context) {} 134 : keyboard::KeyboardUIContent(context) {}
135 135
136 ChromeKeyboardUI::~ChromeKeyboardUI() { 136 ChromeKeyboardUI::~ChromeKeyboardUI() {
137 DCHECK(!keyboard_controller()); 137 DCHECK(!keyboard_controller());
138 } 138 }
139 139
140 ui::InputMethod* ChromeKeyboardUI::GetInputMethod() { 140 ui::InputMethod* ChromeKeyboardUI::GetInputMethod() {
141 aura::Window* root_window = ash::Shell::GetTargetRootWindow(); 141 aura::Window* root_window = ash::Shell::GetRootWindowForNewWindows();
142 DCHECK(root_window); 142 DCHECK(root_window);
143 return root_window->GetHost()->GetInputMethod(); 143 return root_window->GetHost()->GetInputMethod();
144 } 144 }
145 145
146 void ChromeKeyboardUI::RequestAudioInput( 146 void ChromeKeyboardUI::RequestAudioInput(
147 content::WebContents* web_contents, 147 content::WebContents* web_contents,
148 const content::MediaStreamRequest& request, 148 const content::MediaStreamRequest& request,
149 const content::MediaResponseCallback& callback) { 149 const content::MediaResponseCallback& callback) {
150 const extensions::Extension* extension = NULL; 150 const extensions::Extension* extension = NULL;
151 GURL origin(request.security_origin); 151 GURL origin(request.security_origin);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 event_args->Append(std::move(input_context)); 232 event_args->Append(std::move(input_context));
233 233
234 std::unique_ptr<extensions::Event> event(new extensions::Event( 234 std::unique_ptr<extensions::Event> event(new extensions::Event(
235 extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_TEXT_INPUT_BOX_FOCUSED, 235 extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_TEXT_INPUT_BOX_FOCUSED,
236 virtual_keyboard_private::OnTextInputBoxFocused::kEventName, 236 virtual_keyboard_private::OnTextInputBoxFocused::kEventName,
237 std::move(event_args))); 237 std::move(event_args)));
238 event->restrict_to_browser_context = browser_context(); 238 event->restrict_to_browser_context = browser_context();
239 router->DispatchEventToExtension(kVirtualKeyboardExtensionID, 239 router->DispatchEventToExtension(kVirtualKeyboardExtensionID,
240 std::move(event)); 240 std::move(event));
241 } 241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698