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

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

Issue 80263005: Use RemoteInputMethodWin in production (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « ui/base/ime/remote_input_method_win.h ('k') | no next file » | 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 3f0ff991e9e5906f5caf1284e8783849cb81ad86..3167c20ffb4c13a8ad6a07db83c16fa4f04c51a7 100644
--- a/ui/base/ime/remote_input_method_win.cc
+++ b/ui/base/ime/remote_input_method_win.cc
@@ -6,6 +6,8 @@
#include "base/observer_list.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/win/metro.h"
+#include "base/win/scoped_handle.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/input_method_delegate.h"
#include "ui/base/ime/input_method_observer.h"
@@ -373,6 +375,17 @@ class RemoteInputMethodWin : public InputMethod,
} // namespace
+bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget) {
+ DWORD process_id = 0;
+ if (GetWindowThreadProcessId(widget, &process_id) == 0)
+ return false;
+ base::win::ScopedHandle process_handle(::OpenProcess(
+ PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id));
+ if (!process_handle.IsValid())
+ return false;
+ return base::win::IsProcessImmersive(process_handle.Get());
+}
+
RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {}
scoped_ptr<InputMethod> CreateRemoteInputMethodWin(
« no previous file with comments | « ui/base/ime/remote_input_method_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698