OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/win/metro.h" | 5 #include "base/win/metro.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/win/scoped_comptr.h" | 9 #include "base/win/scoped_comptr.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 IsImmersiveProcessFunc is_immersive_process = | 64 IsImmersiveProcessFunc is_immersive_process = |
65 reinterpret_cast<IsImmersiveProcessFunc>( | 65 reinterpret_cast<IsImmersiveProcessFunc>( |
66 ::GetProcAddress(user32, "IsImmersiveProcess")); | 66 ::GetProcAddress(user32, "IsImmersiveProcess")); |
67 | 67 |
68 if (is_immersive_process) | 68 if (is_immersive_process) |
69 return is_immersive_process(process) ? true: false; | 69 return is_immersive_process(process) ? true: false; |
70 return false; | 70 return false; |
71 } | 71 } |
72 | 72 |
73 bool IsTSFAwareRequired() { | 73 bool IsTSFAwareRequired() { |
74 #if defined(USE_AURA) | |
75 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | |
76 return true; | |
77 #endif | |
78 // Although this function is equal to IsMetroProcess at this moment, | 74 // Although this function is equal to IsMetroProcess at this moment, |
79 // Chrome for Win7 and Vista may support TSF in the future. | 75 // Chrome for Win7 and Vista may support TSF in the future. |
80 return g_should_tsf_aware_required || IsMetroProcess(); | 76 return g_should_tsf_aware_required || IsMetroProcess(); |
81 } | 77 } |
82 | 78 |
83 void SetForceToUseTSF() { | 79 void SetForceToUseTSF() { |
84 g_should_tsf_aware_required = true; | 80 g_should_tsf_aware_required = true; |
85 | 81 |
86 // Since Windows 8 Metro mode disables CUAS (Cicero Unaware Application | 82 // Since Windows 8 Metro mode disables CUAS (Cicero Unaware Application |
87 // Support) via ImmDisableLegacyIME API, Chrome must be fully TSF-aware on | 83 // Support) via ImmDisableLegacyIME API, Chrome must be fully TSF-aware on |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 reinterpret_cast<GetInitialSearchString>( | 174 reinterpret_cast<GetInitialSearchString>( |
179 ::GetProcAddress(metro, "GetInitialSearchString")); | 175 ::GetProcAddress(metro, "GetInitialSearchString")); |
180 DCHECK(initial_search_string); | 176 DCHECK(initial_search_string); |
181 *params = initial_search_string(); | 177 *params = initial_search_string(); |
182 } | 178 } |
183 return launch_type; | 179 return launch_type; |
184 } | 180 } |
185 | 181 |
186 } // namespace win | 182 } // namespace win |
187 } // namespace base | 183 } // namespace base |
OLD | NEW |