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

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

Issue 645683002: Get IME's to work in Chrome OS mode on Windows 7. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit errors Created 6 years, 2 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 | « chrome/browser/ui/views/app_list/win/app_list_service_win.cc ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/remote_input_method_win.cc
diff --git a/ui/base/ime/remote_input_method_win.cc b/ui/base/ime/remote_input_method_win.cc
index b01a39c1205f13542342032cbf7c0f5809dafb99..0b75c0762c2dcba50a0a54012bf2b7f2977e846d 100644
--- a/ui/base/ime/remote_input_method_win.cc
+++ b/ui/base/ime/remote_input_method_win.cc
@@ -4,6 +4,7 @@
#include "ui/base/ime/remote_input_method_win.h"
+#include "base/command_line.h"
#include "base/observer_list.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/metro.h"
@@ -14,6 +15,7 @@
#include "ui/base/ime/remote_input_method_delegate_win.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/base/ime/win/tsf_input_scope.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/rect.h"
@@ -364,6 +366,10 @@ class RemoteInputMethodWin : public InputMethod,
} // namespace
bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget) {
+ // If the remote input method is already registered then don't do it again.
+ if (ui::g_public_interface_ && ui::g_private_interface_)
+ return false;
+
DWORD process_id = 0;
if (GetWindowThreadProcessId(widget, &process_id) == 0)
return false;
@@ -371,7 +377,9 @@ bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget) {
PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id));
if (!process_handle.IsValid())
return false;
- return base::win::IsProcessImmersive(process_handle.Get());
+ return base::win::IsProcessImmersive(process_handle.Get()) ||
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kViewerConnect);
}
RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {}
« no previous file with comments | « chrome/browser/ui/views/app_list/win/app_list_service_win.cc ('k') | win8/metro_driver/ime/text_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698