OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 public menus::SimpleMenuModel::Delegate { | 26 public menus::SimpleMenuModel::Delegate { |
27 public: | 27 public: |
28 LanguageSwitchMenu(); | 28 LanguageSwitchMenu(); |
29 | 29 |
30 // Initializes language selection menu contents. | 30 // Initializes language selection menu contents. |
31 void InitLanguageMenu(); | 31 void InitLanguageMenu(); |
32 | 32 |
33 // Returns current locale name to be placed on the language menu-button. | 33 // Returns current locale name to be placed on the language menu-button. |
34 std::wstring GetCurrentLocaleName() const; | 34 std::wstring GetCurrentLocaleName() const; |
35 | 35 |
36 // Returns original width of the first level menu to be shown when called. | 36 // Sets the minimum width of the first level menu to be shown. |
37 int GetFirstLevelMenuWidth() const; | |
38 void SetFirstLevelMenuWidth(int width); | 37 void SetFirstLevelMenuWidth(int width); |
39 | 38 |
40 void set_menu_offset(int delta_x, int delta_y) { | 39 void set_menu_offset(int delta_x, int delta_y) { |
41 delta_x_ = delta_x; | 40 delta_x_ = delta_x; |
42 delta_y_ = delta_y; | 41 delta_y_ = delta_y; |
43 } | 42 } |
44 | 43 |
45 // Switches the current locale, saves the new locale in preferences. | 44 // Switches the current locale, saves the new locale in preferences. |
46 static void SwitchLanguage(const std::string& locale); | 45 static void SwitchLanguage(const std::string& locale); |
47 | 46 |
(...skipping 18 matching lines...) Expand all Loading... |
66 | 65 |
67 int delta_x_, delta_y_; | 66 int delta_x_, delta_y_; |
68 | 67 |
69 FRIEND_TEST(::WizardControllerTest, SwitchLanguage); | 68 FRIEND_TEST(::WizardControllerTest, SwitchLanguage); |
70 DISALLOW_COPY_AND_ASSIGN(LanguageSwitchMenu); | 69 DISALLOW_COPY_AND_ASSIGN(LanguageSwitchMenu); |
71 }; | 70 }; |
72 | 71 |
73 } // namespace chromeos | 72 } // namespace chromeos |
74 | 73 |
75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ | 74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ |
OLD | NEW |