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 #ifndef ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ | 5 #ifndef ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ |
6 #define ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ | 6 #define ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
10 | 9 |
11 namespace ash { | 10 namespace ash { |
12 | 11 |
13 class ASH_EXPORT LocaleObserver { | 12 class ASH_EXPORT LocaleObserver { |
14 public: | 13 public: |
15 class Delegate { | 14 class Delegate { |
16 public: | 15 public: |
17 virtual ~Delegate() {} | 16 virtual ~Delegate() {} |
18 | 17 |
19 virtual void AcceptLocaleChange() = 0; | 18 virtual void AcceptLocaleChange() = 0; |
20 virtual void RevertLocaleChange() = 0; | 19 virtual void RevertLocaleChange() = 0; |
21 }; | 20 }; |
22 | 21 |
23 virtual ~LocaleObserver() {} | 22 virtual ~LocaleObserver() {} |
24 | 23 |
25 virtual void OnLocaleChanged(Delegate* delegate, | 24 virtual void OnLocaleChanged(Delegate* delegate, |
26 const std::string& cur_locale, | 25 const std::string& cur_locale, |
27 const std::string& from_locale, | 26 const std::string& from_locale, |
28 const std::string& to_locale) = 0; | 27 const std::string& to_locale) = 0; |
29 }; | 28 }; |
30 | 29 |
31 } // namespace ash | 30 } // namespace ash |
32 | 31 |
33 #endif // ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ | 32 #endif // ASH_SYSTEM_LOCALE_LOCALE_OBSERVER_H_ |
OLD | NEW |