 Chromium Code Reviews
 Chromium Code Reviews Issue 2971363002:
  Detect if osk is visible on windows  (Closed)
    
  
    Issue 2971363002:
  Detect if osk is visible on windows  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/win/osk_display_manager.h" | 5 #include "ui/base/win/osk_display_manager.h" | 
| 6 | 6 | 
| 7 #include <windows.h> | 7 #include <windows.h> | 
| 8 #include <shellapi.h> | 8 #include <shellapi.h> | 
| 9 #include <shlobj.h> | 9 #include <shlobj.h> | 
| 10 #include <shobjidl.h> // Must be before propkey. | 10 #include <shobjidl.h> // Must be before propkey. | 
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 &common_program_files))) { | 353 &common_program_files))) { | 
| 354 return false; | 354 return false; | 
| 355 } | 355 } | 
| 356 common_program_files_path = common_program_files; | 356 common_program_files_path = common_program_files; | 
| 357 } | 357 } | 
| 358 osk_path->insert(common_program_files_offset, common_program_files_path); | 358 osk_path->insert(common_program_files_offset, common_program_files_path); | 
| 359 } | 359 } | 
| 360 return !osk_path->empty(); | 360 return !osk_path->empty(); | 
| 361 } | 361 } | 
| 362 | 362 | 
| 363 bool OnScreenKeyboardDisplayManager::IsKeyboardVisible() { | |
| 
Peter Kasting
2017/07/08 02:19:31
This file already has CheckIfKeyboardVisible() abo
 
girard
2017/07/10 20:23:51
Patchset 2 contains this fix. The refactor was a b
 | |
| 364 if (base::win::GetVersion() < base::win::VERSION_WIN8) | |
| 365 return false; | |
| 366 HWND osk = ::FindWindow(kOSKClassName, nullptr); | |
| 367 return !!::IsWindow(osk) && !!::IsWindowEnabled(osk); | |
| 368 } | |
| 369 | |
| 363 } // namespace ui | 370 } // namespace ui | 
| OLD | NEW |