| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google Inc. | 3 * Copyright (C) 2008, 2009 Google Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 * Boston, MA 02111-1307, USA. | 18 * Boston, MA 02111-1307, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "sky/engine/config.h" | |
| 23 #include "sky/engine/platform/text/TextBreakIteratorInternalICU.h" | 22 #include "sky/engine/platform/text/TextBreakIteratorInternalICU.h" |
| 24 | 23 |
| 25 #include "sky/engine/platform/Language.h" | 24 #include "sky/engine/platform/Language.h" |
| 26 #include "sky/engine/wtf/StdLibExtras.h" | 25 #include "sky/engine/wtf/StdLibExtras.h" |
| 27 #include "sky/engine/wtf/text/CString.h" | 26 #include "sky/engine/wtf/text/CString.h" |
| 28 #include "sky/engine/wtf/text/WTFString.h" | 27 #include "sky/engine/wtf/text/WTFString.h" |
| 29 | 28 |
| 30 namespace blink { | 29 namespace blink { |
| 31 | 30 |
| 32 static const char* UILanguage() | 31 static const char* UILanguage() |
| 33 { | 32 { |
| 34 // Chrome's UI language can be different from the OS UI language on Windows. | 33 // Chrome's UI language can be different from the OS UI language on Windows. |
| 35 // We want to return Chrome's UI language here. | 34 // We want to return Chrome's UI language here. |
| 36 DEFINE_STATIC_LOCAL(const CString, locale, (defaultLanguage().latin1())); | 35 DEFINE_STATIC_LOCAL(const CString, locale, (defaultLanguage().latin1())); |
| 37 return locale.data(); | 36 return locale.data(); |
| 38 } | 37 } |
| 39 | 38 |
| 40 const char* currentSearchLocaleID() | 39 const char* currentSearchLocaleID() |
| 41 { | 40 { |
| 42 return UILanguage(); | 41 return UILanguage(); |
| 43 } | 42 } |
| 44 | 43 |
| 45 const char* currentTextBreakLocaleID() | 44 const char* currentTextBreakLocaleID() |
| 46 { | 45 { |
| 47 return UILanguage(); | 46 return UILanguage(); |
| 48 } | 47 } |
| 49 | 48 |
| 50 } // namespace blink | 49 } // namespace blink |
| OLD | NEW |