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

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

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
OLDNEW
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 #include "chrome/browser/chromeos/login/language_switch_menu.h" 5 #include "chrome/browser/chromeos/login/language_switch_menu.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/input_method/input_method_util.h" 10 #include "chrome/browser/chromeos/input_method/input_method_util.h"
11 #include "chrome/browser/chromeos/language_preferences.h" 11 #include "chrome/browser/chromeos/language_preferences.h"
12 #include "chrome/browser/chromeos/login/screen_observer.h" 12 #include "chrome/browser/chromeos/login/screen_observer.h"
13 #include "chrome/browser/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "views/widget/widget_gtk.h" 16 #include "views/widget/widget_gtk.h"
17 17
18 namespace { 18 namespace {
19 19
20 const int kLanguageMainMenuSize = 5; 20 const int kLanguageMainMenuSize = 5;
21 // TODO(glotov): need to specify the list as a part of the image customization. 21 // TODO(glotov): need to specify the list as a part of the image customization.
22 const char kLanguagesTopped[] = "es,it,de,fr,en-US"; 22 const char kLanguagesTopped[] = "es,it,de,fr,en-US";
23 const int kMoreLanguagesSubMenu = 200; 23 const int kMoreLanguagesSubMenu = 200;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void LanguageSwitchMenu::ExecuteCommand(int command_id) { 138 void LanguageSwitchMenu::ExecuteCommand(int command_id) {
139 const std::string locale = language_list_->GetLocaleFromIndex(command_id); 139 const std::string locale = language_list_->GetLocaleFromIndex(command_id);
140 SwitchLanguage(locale); 140 SwitchLanguage(locale);
141 InitLanguageMenu(); 141 InitLanguageMenu();
142 142
143 // Update all view hierarchies that the locale has changed. 143 // Update all view hierarchies that the locale has changed.
144 views::Widget::NotifyLocaleChanged(); 144 views::Widget::NotifyLocaleChanged();
145 } 145 }
146 146
147 } // namespace chromeos 147 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698