OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/base/ime/remote_input_method_win.h" | 5 #include "ui/base/ime/remote_input_method_win.h" |
6 | 6 |
7 #include "base/observer_list.h" | 7 #include "base/observer_list.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/win/metro.h" | 9 #include "base/win/metro.h" |
10 #include "base/win/scoped_handle.h" | 10 #include "base/win/scoped_handle.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 183 } |
184 | 184 |
185 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE { | 185 virtual bool DispatchKeyEvent(const ui::KeyEvent& event) OVERRIDE { |
186 if (event.HasNativeEvent()) { | 186 if (event.HasNativeEvent()) { |
187 const base::NativeEvent& native_key_event = event.native_event(); | 187 const base::NativeEvent& native_key_event = event.native_event(); |
188 if (native_key_event.message != WM_CHAR) | 188 if (native_key_event.message != WM_CHAR) |
189 return false; | 189 return false; |
190 if (!text_input_client_) | 190 if (!text_input_client_) |
191 return false; | 191 return false; |
192 text_input_client_->InsertChar( | 192 text_input_client_->InsertChar( |
193 static_cast<char16>(native_key_event.wParam), | 193 static_cast<base::char16>(native_key_event.wParam), |
194 ui::GetModifiersFromKeyState()); | 194 ui::GetModifiersFromKeyState()); |
195 return true; | 195 return true; |
196 } | 196 } |
197 | 197 |
198 if (event.is_char()) { | 198 if (event.is_char()) { |
199 if (text_input_client_) { | 199 if (text_input_client_) { |
200 text_input_client_->InsertChar(event.key_code(), | 200 text_input_client_->InsertChar(event.key_code(), |
201 ui::GetModifiersFromKeyState()); | 201 ui::GetModifiersFromKeyState()); |
202 } | 202 } |
203 return true; | 203 return true; |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); | 380 return scoped_ptr<InputMethod>(new RemoteInputMethodWin(delegate)); |
381 } | 381 } |
382 | 382 |
383 // static | 383 // static |
384 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( | 384 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( |
385 InputMethod* input_method) { | 385 InputMethod* input_method) { |
386 return GetPrivate(input_method); | 386 return GetPrivate(input_method); |
387 } | 387 } |
388 | 388 |
389 } // namespace ui | 389 } // namespace ui |
OLD | NEW |