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

Side by Side Diff: chrome/browser/chromeos/dom_ui/language_options_handler.h

Issue 3072028: Build the language list just like we do in the C++ version. (Closed)
Patch Set: address comments 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/dom_ui/language_options_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/input_method/input_method_util.h"
9 #include "chrome/browser/dom_ui/options_ui.h" 10 #include "chrome/browser/dom_ui/options_ui.h"
10 11
11 class DictionaryValue; 12 class DictionaryValue;
12 class ListValue; 13 class ListValue;
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 // ChromeOS language options page UI handler. 17 // ChromeOS language options page UI handler.
17 class LanguageOptionsHandler : public OptionsPageUIHandler { 18 class LanguageOptionsHandler : public OptionsPageUIHandler {
18 public: 19 public:
19 LanguageOptionsHandler(); 20 LanguageOptionsHandler();
20 virtual ~LanguageOptionsHandler(); 21 virtual ~LanguageOptionsHandler();
21 22
22 // OptionsUIHandler implementation. 23 // OptionsUIHandler implementation.
23 virtual void GetLocalizedValues(DictionaryValue* localized_strings); 24 virtual void GetLocalizedValues(DictionaryValue* localized_strings);
24 25
25 // DOMMessageHandler implementation. 26 // DOMMessageHandler implementation.
26 virtual void RegisterMessages(); 27 virtual void RegisterMessages();
27 28
28 private: 29 private:
29 // Gets the list of input methods. The return value will look like: 30 // Gets the list of input methods from the given input descriptors.
31 // The return value will look like:
30 // [{'id': 'pinyin', 'displayName': 'Pinyin', 'languageCode': 'zh-CW'}, ...] 32 // [{'id': 'pinyin', 'displayName': 'Pinyin', 'languageCode': 'zh-CW'}, ...]
31 ListValue* GetInputMethodList(); 33 ListValue* GetInputMethodList(const InputMethodDescriptors& descriptors);
32 34
33 // Gets the list of languages. The return value will look like: 35 // Gets the list of languages from the given input descriptors.
36 // The return value will look like:
34 // [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'}, 37 // [{'code': 'fi', 'displayName': 'Finnish', 'nativeDisplayName': 'suomi'},
35 // ...] 38 // ...]
36 ListValue* GetLanguageList(); 39 ListValue* GetLanguageList(const InputMethodDescriptors& descriptors);
37 40
38 // Called when the UI language is changed. 41 // Called when the UI language is changed.
39 // |value| will be the language code as string (ex. "fr"). 42 // |value| will be the language code as string (ex. "fr").
40 void UiLanguageChangeCallback(const Value* value); 43 void UiLanguageChangeCallback(const Value* value);
41 44
42 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler); 45 DISALLOW_COPY_AND_ASSIGN(LanguageOptionsHandler);
43 }; 46 };
44 47
45 } // namespace 48 } // namespace
46 49
47 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_ 50 #endif // CHROME_BROWSER_CHROMEOS_DOM_UI_LANGUAGE_OPTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/dom_ui/language_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698