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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "content/public/browser/url_data_source.h" | 43 #include "content/public/browser/url_data_source.h" |
44 #include "content/public/browser/web_ui.h" | 44 #include "content/public/browser/web_ui.h" |
45 #include "content/public/browser/web_ui_data_source.h" | 45 #include "content/public/browser/web_ui_data_source.h" |
46 #include "content/public/browser/web_ui_message_handler.h" | 46 #include "content/public/browser/web_ui_message_handler.h" |
47 #include "content/public/common/user_agent.h" | 47 #include "content/public/common/user_agent.h" |
48 #include "extensions/browser/extension_prefs.h" | 48 #include "extensions/browser/extension_prefs.h" |
49 #include "extensions/browser/extension_system.h" | 49 #include "extensions/browser/extension_system.h" |
50 #include "extensions/common/extension.h" | 50 #include "extensions/common/extension.h" |
51 #include "extensions/features/features.h" | 51 #include "extensions/features/features.h" |
52 #include "ui/base/l10n/l10n_util.h" | 52 #include "ui/base/l10n/l10n_util.h" |
53 #include "v8/include/v8.h" | |
54 | 53 |
55 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
56 #include "base/win/windows_version.h" | 55 #include "base/win/windows_version.h" |
57 #endif | 56 #endif |
58 | 57 |
59 using base::ASCIIToUTF16; | 58 using base::ASCIIToUTF16; |
60 using content::WebUIMessageHandler; | 59 using content::WebUIMessageHandler; |
61 | 60 |
62 namespace { | 61 namespace { |
63 | 62 |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) | 437 VoiceSearchUI::VoiceSearchUI(content::WebUI* web_ui) |
439 : content::WebUIController(web_ui) { | 438 : content::WebUIController(web_ui) { |
440 Profile* profile = Profile::FromWebUI(web_ui); | 439 Profile* profile = Profile::FromWebUI(web_ui); |
441 web_ui->AddMessageHandler(base::MakeUnique<VoiceSearchDomHandler>(profile)); | 440 web_ui->AddMessageHandler(base::MakeUnique<VoiceSearchDomHandler>(profile)); |
442 | 441 |
443 // Set up the about:voicesearch source. | 442 // Set up the about:voicesearch source. |
444 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); | 443 content::WebUIDataSource::Add(profile, CreateVoiceSearchUiHtmlSource()); |
445 } | 444 } |
446 | 445 |
447 VoiceSearchUI::~VoiceSearchUI() {} | 446 VoiceSearchUI::~VoiceSearchUI() {} |
OLD | NEW |