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

Side by Side Diff: ui/keyboard/keyboard_ui_handler.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/keyboard/keyboard_util.h » ('j') | 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 "ui/keyboard/keyboard_ui_handler.h" 5 #include "ui/keyboard/keyboard_ui_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (!args->GetDictionary(0, &params) || 108 if (!args->GetDictionary(0, &params) ||
109 !params->GetString("type", &type) || 109 !params->GetString("type", &type) ||
110 !params->GetInteger("charValue", &char_value) || 110 !params->GetInteger("charValue", &char_value) ||
111 !params->GetInteger("keyCode", &key_code) || 111 !params->GetInteger("keyCode", &key_code) ||
112 !params->GetString("keyName", &key_name) || 112 !params->GetString("keyName", &key_name) ||
113 !params->GetInteger("modifiers", &modifiers)) { 113 !params->GetInteger("modifiers", &modifiers)) {
114 LOG(ERROR) << "SendKeyEvent failed: bad argument"; 114 LOG(ERROR) << "SendKeyEvent failed: bad argument";
115 return; 115 return;
116 } 116 }
117 117
118 aura::WindowEventDispatcher* dispatcher = 118 aura::WindowEventDispatcher* dispatcher = web_ui()->GetWebContents()->
119 web_ui()->GetWebContents()->GetView()->GetNativeView()->GetDispatcher(); 119 GetView()->GetNativeView()->GetHost()->dispatcher();
120 if (!dispatcher) { 120 if (!dispatcher) {
121 LOG(ERROR) << "sendKeyEvent failed: no dispatcher"; 121 LOG(ERROR) << "sendKeyEvent failed: no dispatcher";
122 return; 122 return;
123 } 123 }
124 124
125 if (!keyboard::SendKeyEvent(type, 125 if (!keyboard::SendKeyEvent(type,
126 char_value, 126 char_value,
127 key_code, 127 key_code,
128 key_name, 128 key_name,
129 modifiers, 129 modifiers,
130 dispatcher)) { 130 dispatcher)) {
131 LOG(ERROR) << "sendKeyEvent failed"; 131 LOG(ERROR) << "sendKeyEvent failed";
132 } 132 }
133 } 133 }
134 134
135 void KeyboardUIHandler::HandleHideKeyboard(const base::ListValue* args) { 135 void KeyboardUIHandler::HandleHideKeyboard(const base::ListValue* args) {
136 // TODO(stevet): Call into the keyboard controller to hide the keyboard 136 // TODO(stevet): Call into the keyboard controller to hide the keyboard
137 // directly. 137 // directly.
138 NOTIMPLEMENTED(); 138 NOTIMPLEMENTED();
139 return; 139 return;
140 } 140 }
141 141
142 } // namespace keyboard 142 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | ui/keyboard/keyboard_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698