Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: chrome/browser/chromeos/login/language_switch_menu.cc

Issue 7520037: [cros] Network dropdown button in WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move handle click Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/login/language_switch_menu.h" 5 #include "chrome/browser/chromeos/login/language_switch_menu.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 // Fill menu items with updated items. 58 // Fill menu items with updated items.
59 for (int line = 0; line != kLanguageMainMenuSize; line++) { 59 for (int line = 0; line != kLanguageMainMenuSize; line++) {
60 menu_->AppendMenuItemWithLabel( 60 menu_->AppendMenuItemWithLabel(
61 line, 61 line,
62 UTF16ToWide(language_list_->GetLanguageNameAt(line))); 62 UTF16ToWide(language_list_->GetLanguageNameAt(line)));
63 } 63 }
64 64
65 menu_->AppendSeparator(); 65 menu_->AppendSeparator();
66 views::MenuItemView* submenu = menu_->AppendSubMenu( 66 views::MenuItemInterface* submenu = menu_->AppendSubMenu(
67 kMoreLanguagesSubMenu, 67 kMoreLanguagesSubMenu,
68 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LANGUAGES_MORE))); 68 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LANGUAGES_MORE)));
69 69
70 for (int line = kLanguageMainMenuSize; 70 for (int line = kLanguageMainMenuSize;
71 line != language_list_->languages_count(); ++line) { 71 line != language_list_->languages_count(); ++line) {
72 submenu->AppendMenuItemWithLabel( 72 submenu->AppendMenuItemWithLabel(
73 line, 73 line,
74 UTF16ToWide(language_list_->GetLanguageNameAt(line))); 74 UTF16ToWide(language_list_->GetLanguageNameAt(line)));
75 } 75 }
76 76
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 g_browser_process->local_state()->SetString( 186 g_browser_process->local_state()->SetString(
187 prefs::kApplicationLocale, locale); 187 prefs::kApplicationLocale, locale);
188 g_browser_process->local_state()->ScheduleSavePersistentPrefs(); 188 g_browser_process->local_state()->ScheduleSavePersistentPrefs();
189 InitLanguageMenu(); 189 InitLanguageMenu();
190 190
191 // Update all view hierarchies that the locale has changed. 191 // Update all view hierarchies that the locale has changed.
192 views::Widget::NotifyLocaleChanged(); 192 views::Widget::NotifyLocaleChanged();
193 } 193 }
194 194
195 } // namespace chromeos 195 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698