diff options
author | yoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 06:42:11 +0000 |
---|---|---|
committer | yoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-15 06:42:11 +0000 |
commit | 0c4c54f2d40dc0f8df1c826ef4b41021142e4df5 (patch) | |
tree | ee1223f1bb74e7878c5ac96dc8945623e5fe13f9 /base | |
parent | 15fa9ef8f091fb409143cb76758d7a67f0fb3aa4 (diff) | |
download | chromium_src-0c4c54f2d40dc0f8df1c826ef4b41021142e4df5.zip chromium_src-0c4c54f2d40dc0f8df1c826ef4b41021142e4df5.tar.gz chromium_src-0c4c54f2d40dc0f8df1c826ef4b41021142e4df5.tar.bz2 |
Add IsTsfAwareRequired method
Currently, this method is same as IsMetroProcess.
But whether an application must aware TSF is independent from it is under Metro style.
So this method will be changed.
BUG=137627
TEST=Trybot
Review URL: https://chromiumcodereview.appspot.com/10855072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/win/metro.cc | 6 | ||||
-rw-r--r-- | base/win/metro.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/base/win/metro.cc b/base/win/metro.cc index a8436cb..c806f62 100644 --- a/base/win/metro.cc +++ b/base/win/metro.cc @@ -73,6 +73,12 @@ bool IsMetroProcess() { return state == kImmersiveTrue; } +bool IsTsfAwareRequired() { + // Although this function is equal to IsMetroProcess at this moment, + // Chrome for Win7 and Vista may support TSF in the future. + return IsMetroProcess(); +} + wchar_t* LocalAllocAndCopyString(const string16& src) { size_t dest_size = (src.length() + 1) * sizeof(wchar_t); wchar_t* dest = reinterpret_cast<wchar_t*>(LocalAlloc(LPTR, dest_size)); diff --git a/base/win/metro.h b/base/win/metro.h index 6540c59..9083388 100644 --- a/base/win/metro.h +++ b/base/win/metro.h @@ -55,6 +55,10 @@ BASE_EXPORT HMODULE GetMetroModule(); // in Windows Metro mode. BASE_EXPORT bool IsMetroProcess(); +// Returns true if this process is running under Text Services Framework (TSF) +// and browser must be TSF-aware. +BASE_EXPORT bool IsTsfAwareRequired(); + // Allocates and returns the destination string via the LocalAlloc API after // copying the src to it. BASE_EXPORT wchar_t* LocalAllocAndCopyString(const string16& src); |