1 // Copyright (c) 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef XWALK_RUNTIME_BROWSER_TIZEN_TIZEN_LOCALE_LISTENER_H_
6 #define XWALK_RUNTIME_BROWSER_TIZEN_TIZEN_LOCALE_LISTENER_H_
11 #include "base/threading/simple_thread.h"
15 class TizenLocaleListener : public base::SimpleThread {
17 TizenLocaleListener();
18 virtual ~TizenLocaleListener();
20 virtual void Run() OVERRIDE;
22 // Get the latest application locale from system.
23 // locale is a langtag defined in [BCP47]
24 std::string GetLocale() const;
25 // Set the locale and apply this locale to all applications.
26 // Locale is a langtag defined in [BCP47].
27 // This function will called by TizenLocaleListener when locale is changed.
28 void SetLocale(const std::string& locale);
31 GMainLoop* main_loop_;
32 // The locale is a langtag defined in [BCP47]
38 #endif // XWALK_RUNTIME_BROWSER_TIZEN_TIZEN_LOCALE_LISTENER_H_