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

Unified Diff: ui/base/ime/input_method_win.cc

Issue 158313002: Remove non-Aura stuff from InputMethodWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_win.cc
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index ac9a1ad95497e208586f46a8fdd4c01bdc3a6799..df2129adb42ff0bdadd6bcffd8af6f3f83c34c2f 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -319,38 +319,22 @@ HWND InputMethodWin::GetAttachedWindowHandle(
// represents the valid top-level window handle because each top-level window
// is responsible for lifecycle management of corresponding InputMethod
// instance.
-#if defined(USE_AURA)
return toplevel_window_handle_;
-#else
- // On Non-Aura environment, TextInputClient::GetAttachedWindow() returns
- // window handle to which each input method is bound.
- if (!text_input_client)
- return NULL;
- return text_input_client->GetAttachedWindow();
-#endif
}
bool InputMethodWin::IsWindowFocused(const TextInputClient* client) const {
if (!client)
return false;
HWND attached_window_handle = GetAttachedWindowHandle(client);
-#if defined(USE_AURA)
// When Aura is enabled, |attached_window_handle| should always be a top-level
// window. So we can safely assume that |attached_window_handle| is ready for
// receiving keyboard input as long as it is an active window. This works well
// even when the |attached_window_handle| becomes active but has not received
// WM_FOCUS yet.
return attached_window_handle && GetActiveWindow() == attached_window_handle;
-#else
- return attached_window_handle && GetFocus() == attached_window_handle;
-#endif
}
bool InputMethodWin::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) {
- // TODO(ananta)
- // Support IMEs and RTL layout in Windows 8 metro Ash. The code below won't
- // work with IMEs.
- // Bug: https://code.google.com/p/chromium/issues/detail?id=164964
if (event.is_char()) {
if (GetTextInputClient()) {
GetTextInputClient()->InsertChar(event.key_code(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698