| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/win/metro.h" | 10 #include "base/win/metro.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 return false; | 377 return false; |
| 378 | 378 |
| 379 DWORD process_id = 0; | 379 DWORD process_id = 0; |
| 380 if (GetWindowThreadProcessId(widget, &process_id) == 0) | 380 if (GetWindowThreadProcessId(widget, &process_id) == 0) |
| 381 return false; | 381 return false; |
| 382 base::win::ScopedHandle process_handle(::OpenProcess( | 382 base::win::ScopedHandle process_handle(::OpenProcess( |
| 383 PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id)); | 383 PROCESS_QUERY_LIMITED_INFORMATION, FALSE, process_id)); |
| 384 if (!process_handle.IsValid()) | 384 if (!process_handle.IsValid()) |
| 385 return false; | 385 return false; |
| 386 return base::win::IsProcessImmersive(process_handle.Get()) || | 386 return base::win::IsProcessImmersive(process_handle.Get()) || |
| 387 CommandLine::ForCurrentProcess()->HasSwitch( | 387 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 388 switches::kViewerConnect); | 388 switches::kViewerConnect); |
| 389 } | 389 } |
| 390 | 390 |
| 391 RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {} | 391 RemoteInputMethodPrivateWin::RemoteInputMethodPrivateWin() {} |
| 392 | 392 |
| 393 scoped_ptr<InputMethod> CreateRemoteInputMethodWin( | 393 scoped_ptr<InputMethod> CreateRemoteInputMethodWin( |
| 394 internal::InputMethodDelegate* delegate) { | 394 internal::InputMethodDelegate* delegate) { |
| 395 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); | 395 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); |
| 396 } | 396 } |
| 397 | 397 |
| 398 // static | 398 // static |
| 399 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( | 399 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( |
| 400 InputMethod* input_method) { | 400 InputMethod* input_method) { |
| 401 return GetPrivate(input_method); | 401 return GetPrivate(input_method); |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace ui | 404 } // namespace ui |
| OLD | NEW |