| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Initializes language selection menu contents. | 30 // Initializes language selection menu contents. |
| 31 void InitLanguageMenu(); | 31 void InitLanguageMenu(); |
| 32 | 32 |
| 33 // Sets menu's alignment. | 33 // Sets menu's alignment. |
| 34 void set_menu_alignment(views::Menu2::Alignment alignment) { | 34 void set_menu_alignment(views::Menu2::Alignment alignment) { |
| 35 menu_alignment_ = alignment; | 35 menu_alignment_ = alignment; |
| 36 } | 36 } |
| 37 | 37 |
| 38 // Returns current locale name to be placed on the language menu-button. | 38 // Returns current locale name to be placed on the language menu-button. |
| 39 std::wstring GetCurrentLocaleName() const; | 39 string16 GetCurrentLocaleName() const; |
| 40 | 40 |
| 41 // Sets the minimum width of the first level menu to be shown. | 41 // Sets the minimum width of the first level menu to be shown. |
| 42 void SetFirstLevelMenuWidth(int width); | 42 void SetFirstLevelMenuWidth(int width); |
| 43 | 43 |
| 44 // Switches the current locale, saves the new locale in preferences. | 44 // Switches the current locale, saves the new locale in preferences. |
| 45 static void SwitchLanguage(const std::string& locale); | 45 static void SwitchLanguage(const std::string& locale); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // views::ViewMenuDelegate implementation. | 48 // views::ViewMenuDelegate implementation. |
| 49 virtual void RunMenu(views::View* source, const gfx::Point& pt); | 49 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 66 // Menu alignment. | 66 // Menu alignment. |
| 67 views::Menu2::Alignment menu_alignment_; | 67 views::Menu2::Alignment menu_alignment_; |
| 68 | 68 |
| 69 FRIEND_TEST(::WizardControllerTest, SwitchLanguage); | 69 FRIEND_TEST(::WizardControllerTest, SwitchLanguage); |
| 70 DISALLOW_COPY_AND_ASSIGN(LanguageSwitchMenu); | 70 DISALLOW_COPY_AND_ASSIGN(LanguageSwitchMenu); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace chromeos | 73 } // namespace chromeos |
| 74 | 74 |
| 75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ | 75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LANGUAGE_SWITCH_MENU_H_ |
| OLD | NEW |