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

Side by Side Diff: base/win/metro.cc

Issue 13235003: Support the Text services framework based IME for Chrome AURA on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/ime/input_method_win.h » ('j') | ui/base/ime/input_method_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 7 #include "base/message_loop.h"
8 #include "base/string_util.h" 8 #include "base/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
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
74 // Although this function is equal to IsMetroProcess at this moment, 78 // Although this function is equal to IsMetroProcess at this moment,
75 // Chrome for Win7 and Vista may support TSF in the future. 79 // Chrome for Win7 and Vista may support TSF in the future.
76 return g_should_tsf_aware_required || IsMetroProcess(); 80 return g_should_tsf_aware_required || IsMetroProcess();
77 } 81 }
78 82
79 void SetForceToUseTSF() { 83 void SetForceToUseTSF() {
80 g_should_tsf_aware_required = true; 84 g_should_tsf_aware_required = true;
81 85
82 // Since Windows 8 Metro mode disables CUAS (Cicero Unaware Application 86 // Since Windows 8 Metro mode disables CUAS (Cicero Unaware Application
83 // Support) via ImmDisableLegacyIME API, Chrome must be fully TSF-aware on 87 // Support) via ImmDisableLegacyIME API, Chrome must be fully TSF-aware on
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 reinterpret_cast<GetInitialSearchString>( 178 reinterpret_cast<GetInitialSearchString>(
175 ::GetProcAddress(metro, "GetInitialSearchString")); 179 ::GetProcAddress(metro, "GetInitialSearchString"));
176 DCHECK(initial_search_string); 180 DCHECK(initial_search_string);
177 *params = initial_search_string(); 181 *params = initial_search_string();
178 } 182 }
179 return launch_type; 183 return launch_type;
180 } 184 }
181 185
182 } // namespace win 186 } // namespace win
183 } // namespace base 187 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | ui/base/ime/input_method_win.h » ('j') | ui/base/ime/input_method_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698