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 #include "chrome/browser/dom_ui/options_ui.h" | 5 #include "chrome/browser/dom_ui/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 141 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
142 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 142 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
143 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); | 143 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); |
144 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); | 144 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); |
145 #if defined(OS_CHROMEOS) | 145 #if defined(OS_CHROMEOS) |
146 AddOptionsPageUIHandler(localized_strings, | 146 AddOptionsPageUIHandler(localized_strings, |
147 new chromeos::AccountsOptionsHandler()); | 147 new chromeos::AccountsOptionsHandler()); |
148 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); | 148 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); |
149 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); | 149 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); |
150 AddOptionsPageUIHandler(localized_strings, | 150 AddOptionsPageUIHandler(localized_strings, |
151 new LanguageChewingOptionsHandler()); | 151 new chromeos::LanguageChewingOptionsHandler()); |
152 AddOptionsPageUIHandler(localized_strings, | 152 AddOptionsPageUIHandler(localized_strings, |
153 new LanguageHangulOptionsHandler()); | 153 new chromeos::LanguageHangulOptionsHandler()); |
154 AddOptionsPageUIHandler(localized_strings, | 154 AddOptionsPageUIHandler(localized_strings, |
155 new LanguageMozcOptionsHandler()); | 155 new chromeos::LanguageMozcOptionsHandler()); |
156 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 156 AddOptionsPageUIHandler(localized_strings, |
| 157 new chromeos::LanguageOptionsHandler()); |
| 158 AddOptionsPageUIHandler(localized_strings, |
| 159 new chromeos::LanguagePinyinOptionsHandler()); |
157 AddOptionsPageUIHandler(localized_strings, new ProxyHandler()); | 160 AddOptionsPageUIHandler(localized_strings, new ProxyHandler()); |
158 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); | 161 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); |
159 AddOptionsPageUIHandler(localized_strings, | |
160 new LanguagePinyinOptionsHandler()); | |
161 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); | 162 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); |
162 #endif | 163 #endif |
163 | 164 |
164 // |localized_strings| ownership is taken over by this constructor. | 165 // |localized_strings| ownership is taken over by this constructor. |
165 OptionsUIHTMLSource* html_source = | 166 OptionsUIHTMLSource* html_source = |
166 new OptionsUIHTMLSource(localized_strings); | 167 new OptionsUIHTMLSource(localized_strings); |
167 | 168 |
168 // Set up the chrome://options/ source. | 169 // Set up the chrome://options/ source. |
169 ChromeThread::PostTask( | 170 ChromeThread::PostTask( |
170 ChromeThread::IO, FROM_HERE, | 171 ChromeThread::IO, FROM_HERE, |
(...skipping 26 matching lines...) Expand all Loading... |
197 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); | 198 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); |
198 } | 199 } |
199 } | 200 } |
200 | 201 |
201 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, | 202 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, |
202 OptionsPageUIHandler* handler) { | 203 OptionsPageUIHandler* handler) { |
203 DCHECK(handler); | 204 DCHECK(handler); |
204 handler->GetLocalizedValues(localized_strings); | 205 handler->GetLocalizedValues(localized_strings); |
205 AddMessageHandler(handler->Attach(this)); | 206 AddMessageHandler(handler->Attach(this)); |
206 } | 207 } |
OLD | NEW |