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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.h

Issue 389913002: Moving IME manifests to chrome resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H _ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H _
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H _ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLER_H _
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/webui/options/language_options_handler.h" 9 #include "chrome/browser/ui/webui/options/language_options_handler.h"
10 #include "chromeos/ime/component_extension_ime_manager.h" 10 #include "chromeos/ime/component_extension_ime_manager.h"
11 #include "chromeos/ime/input_method_descriptor.h" 11 #include "chromeos/ime/input_method_descriptor.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 namespace options { 14 namespace options {
15 15
16 // GetUILanguageList() returns concatenated list of list of vendor languages 16 // GetUILanguageList() returns concatenated list of list of vendor languages
17 // followed by other languages. An entry with "code" attribute set to this value 17 // followed by other languages. An entry with "code" attribute set to this value
18 // is inserted in between. 18 // is inserted in between.
19 extern const char kVendorOtherLanguagesListDivider[]; 19 extern const char kVendorOtherLanguagesListDivider[];
20 20
21 // Language options page UI handler for Chrome OS. For non-Chrome OS, 21 // Language options page UI handler for Chrome OS. For non-Chrome OS,
22 // see LanguageOptionsHnadler. 22 // see LanguageOptionsHnadler.
23 class CrosLanguageOptionsHandler 23 class CrosLanguageOptionsHandler
24 : public ::options::LanguageOptionsHandlerCommon, 24 : public ::options::LanguageOptionsHandlerCommon {
25 public ComponentExtensionIMEManager::Observer {
26 public: 25 public:
27 CrosLanguageOptionsHandler(); 26 CrosLanguageOptionsHandler();
28 virtual ~CrosLanguageOptionsHandler(); 27 virtual ~CrosLanguageOptionsHandler();
29 28
30 // OptionsPageUIHandler implementation. 29 // OptionsPageUIHandler implementation.
31 virtual void GetLocalizedValues( 30 virtual void GetLocalizedValues(
32 base::DictionaryValue* localized_strings) OVERRIDE; 31 base::DictionaryValue* localized_strings) OVERRIDE;
33 32
34 // DOMMessageHandler implementation. 33 // DOMMessageHandler implementation.
35 virtual void RegisterMessages() OVERRIDE; 34 virtual void RegisterMessages() OVERRIDE;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void InputMethodDisableCallback(const base::ListValue* args); 86 void InputMethodDisableCallback(const base::ListValue* args);
88 87
89 // Called when the input method is enabled. 88 // Called when the input method is enabled.
90 // |args| will contain the input method ID as string (ex. "mozc"). 89 // |args| will contain the input method ID as string (ex. "mozc").
91 void InputMethodEnableCallback(const base::ListValue* args); 90 void InputMethodEnableCallback(const base::ListValue* args);
92 91
93 // Called when the input method options page is opened. 92 // Called when the input method options page is opened.
94 // |args| will contain the input method ID as string (ex. "mozc"). 93 // |args| will contain the input method ID as string (ex. "mozc").
95 void InputMethodOptionsOpenCallback(const base::ListValue* args); 94 void InputMethodOptionsOpenCallback(const base::ListValue* args);
96 95
97 // ComponentExtensionIMEManager::Observer override.
98 virtual void OnImeComponentExtensionInitialized() OVERRIDE;
99
100 // Gets the list of languages with |descriptors| based on 96 // Gets the list of languages with |descriptors| based on
101 // |base_language_codes|. 97 // |base_language_codes|.
102 // |insert_divider| means to insert entry with "code" attribute set to 98 // |insert_divider| means to insert entry with "code" attribute set to
103 // kVendorOtherLanguagesListDivider between "most relevant" languages and 99 // kVendorOtherLanguagesListDivider between "most relevant" languages and
104 // other. 100 // other.
105 static base::ListValue* GetLanguageListInternal( 101 static base::ListValue* GetLanguageListInternal(
106 const input_method::InputMethodDescriptors& descriptors, 102 const input_method::InputMethodDescriptors& descriptors,
107 const std::vector<std::string>& base_language_codes, 103 const std::vector<std::string>& base_language_codes,
108 bool insert_divider); 104 bool insert_divider);
109 105
(...skipping 10 matching lines...) Expand all
120 // True if this page was initialized. 116 // True if this page was initialized.
121 bool is_page_initialized_; 117 bool is_page_initialized_;
122 118
123 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler); 119 DISALLOW_COPY_AND_ASSIGN(CrosLanguageOptionsHandler);
124 }; 120 };
125 121
126 } // namespace options 122 } // namespace options
127 } // namespace chromeos 123 } // namespace chromeos
128 124
129 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE R_H_ 125 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CROS_LANGUAGE_OPTIONS_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698