| 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/voice_search_ui.h" | 5 #include "chrome/browser/ui/webui/voice_search_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "content/public/browser/plugin_service.h" | 35 #include "content/public/browser/plugin_service.h" |
| 36 #include "content/public/browser/url_data_source.h" | 36 #include "content/public/browser/url_data_source.h" |
| 37 #include "content/public/browser/web_ui.h" | 37 #include "content/public/browser/web_ui.h" |
| 38 #include "content/public/browser/web_ui_data_source.h" | 38 #include "content/public/browser/web_ui_data_source.h" |
| 39 #include "content/public/browser/web_ui_message_handler.h" | 39 #include "content/public/browser/web_ui_message_handler.h" |
| 40 #include "content/public/common/user_agent.h" | 40 #include "content/public/common/user_agent.h" |
| 41 #include "extensions/browser/extension_prefs.h" | 41 #include "extensions/browser/extension_prefs.h" |
| 42 #include "extensions/browser/extension_system.h" | 42 #include "extensions/browser/extension_system.h" |
| 43 #include "extensions/common/extension.h" | 43 #include "extensions/common/extension.h" |
| 44 #include "grit/browser_resources.h" | 44 #include "grit/browser_resources.h" |
| 45 #include "grit/components_strings.h" |
| 45 #include "ui/base/l10n/l10n_util.h" | 46 #include "ui/base/l10n/l10n_util.h" |
| 46 #include "v8/include/v8.h" | 47 #include "v8/include/v8.h" |
| 47 | 48 |
| 48 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
| 49 #include "base/win/windows_version.h" | 50 #include "base/win/windows_version.h" |
| 50 #endif | 51 #endif |
| 51 | 52 |
| 52 using base::ASCIIToUTF16; | 53 using base::ASCIIToUTF16; |
| 53 using content::WebUIMessageHandler; | 54 using content::WebUIMessageHandler; |
| 54 | 55 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 break; | 241 break; |
| 241 } | 242 } |
| 242 os_label += " SP" + base::IntToString(os->service_pack().major); | 243 os_label += " SP" + base::IntToString(os->service_pack().major); |
| 243 | 244 |
| 244 if (os->service_pack().minor > 0) | 245 if (os->service_pack().minor > 0) |
| 245 os_label += "." + base::IntToString(os->service_pack().minor); | 246 os_label += "." + base::IntToString(os->service_pack().minor); |
| 246 | 247 |
| 247 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE) | 248 if (os->architecture() == base::win::OSInfo::X64_ARCHITECTURE) |
| 248 os_label += " 64 bit"; | 249 os_label += " 64 bit"; |
| 249 #endif | 250 #endif |
| 250 AddPair(list, l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_OS), os_label); | 251 AddPair(list, l10n_util::GetStringUTF8(IDS_VERSION_UI_OS), os_label); |
| 251 | 252 |
| 252 AddLineBreak(list); | 253 AddLineBreak(list); |
| 253 } | 254 } |
| 254 | 255 |
| 255 // Adds information regarding audio to the list. | 256 // Adds information regarding audio to the list. |
| 256 void AddAudioInfo(base::ListValue* list) { | 257 void AddAudioInfo(base::ListValue* list) { |
| 257 // NaCl and its associated functions are not available on most mobile | 258 // NaCl and its associated functions are not available on most mobile |
| 258 // platforms. ENABLE_EXTENSIONS covers those platforms and hey would not | 259 // platforms. ENABLE_EXTENSIONS covers those platforms and hey would not |
| 259 // allow Hotwording anyways since it is an extension. | 260 // allow Hotwording anyways since it is an extension. |
| 260 std::string nacl_enabled = "not available"; | 261 std::string nacl_enabled = "not available"; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) | 435 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) |
| 435 : content::WebUIController(web_ui) { | 436 : content::WebUIController(web_ui) { |
| 436 Profile* profile = Profile::FromWebUI(web_ui); | 437 Profile* profile = Profile::FromWebUI(web_ui); |
| 437 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); | 438 web_ui->AddMessageHandler(new VoiceSearchDomHandler(profile)); |
| 438 | 439 |
| 439 // Set up the about:voicesearch source. | 440 // Set up the about:voicesearch source. |
| 440 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); | 441 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); |
| 441 } | 442 } |
| 442 | 443 |
| 443 VoiceSearchUI::~VoiceSearchUI() {} | 444 VoiceSearchUI::~VoiceSearchUI() {} |
| OLD | NEW |