OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui/voicesearch_ui.h" | 5 #include "chrome/browser/ui/webui/voicesearch_ui.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 switch (pref_state) { | 293 switch (pref_state) { |
294 case extensions::Extension::DISABLED: | 294 case extensions::Extension::DISABLED: |
295 state = "DISABLED"; | 295 state = "DISABLED"; |
296 break; | 296 break; |
297 case extensions::Extension::ENABLED: | 297 case extensions::Extension::ENABLED: |
298 state = "ENABLED"; | 298 state = "ENABLED"; |
299 break; | 299 break; |
300 case extensions::Extension::EXTERNAL_EXTENSION_UNINSTALLED: | 300 case extensions::Extension::EXTERNAL_EXTENSION_UNINSTALLED: |
301 state = "EXTERNAL_EXTENSION_UNINSTALLED"; | 301 state = "EXTERNAL_EXTENSION_UNINSTALLED"; |
302 break; | 302 break; |
303 case extensions::Extension::ENABLED_COMPONENT: | |
304 state = "ENABLED_COMPONENT"; | |
305 break; | |
306 default: | 303 default: |
307 state = "undefined"; | 304 state = "undefined"; |
308 } | 305 } |
309 | 306 |
310 AddPair(list, ASCIIToUTF16("Extension State"), ASCIIToUTF16(state)); | 307 AddPair(list, ASCIIToUTF16("Extension State"), ASCIIToUTF16(state)); |
311 | 308 |
312 AddLineBreak(list); | 309 AddLineBreak(list); |
313 } | 310 } |
314 | 311 |
315 // Adds information specific to voice search in the app launcher to the list. | 312 // Adds information specific to voice search in the app launcher to the list. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) | 364 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) |
368 : content::WebUIController(web_ui) { | 365 : content::WebUIController(web_ui) { |
369 Profile* profile = Profile::FromWebUI(web_ui); | 366 Profile* profile = Profile::FromWebUI(web_ui); |
370 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); | 367 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); |
371 | 368 |
372 // Set up the about:voicesearch source. | 369 // Set up the about:voicesearch source. |
373 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); | 370 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); |
374 } | 371 } |
375 | 372 |
376 VoiceSearchUI::~VoiceSearchUI() {} | 373 VoiceSearchUI::~VoiceSearchUI() {} |
OLD | NEW |