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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 12589005: Implement web speech synthesis. (Closed) Base URL: http://git.chromium.org/chromium/src.git@webtts
Patch Set: Move from content to chrome, add runtime flag Created 7 years, 7 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 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #include "chrome/browser/profiles/profile.h" 59 #include "chrome/browser/profiles/profile.h"
60 #include "chrome/browser/profiles/profile_io_data.h" 60 #include "chrome/browser/profiles/profile_io_data.h"
61 #include "chrome/browser/profiles/profile_manager.h" 61 #include "chrome/browser/profiles/profile_manager.h"
62 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" 62 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
63 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" 63 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h"
64 #include "chrome/browser/search/instant_service.h" 64 #include "chrome/browser/search/instant_service.h"
65 #include "chrome/browser/search/instant_service_factory.h" 65 #include "chrome/browser/search/instant_service_factory.h"
66 #include "chrome/browser/search/search.h" 66 #include "chrome/browser/search/search.h"
67 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h" 67 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h"
68 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" 68 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
69 #include "chrome/browser/speech/tts_message_filter.h"
69 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" 70 #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
70 #include "chrome/browser/ssl/ssl_add_certificate.h" 71 #include "chrome/browser/ssl/ssl_add_certificate.h"
71 #include "chrome/browser/ssl/ssl_blocking_page.h" 72 #include "chrome/browser/ssl/ssl_blocking_page.h"
72 #include "chrome/browser/ssl/ssl_tab_helper.h" 73 #include "chrome/browser/ssl/ssl_tab_helper.h"
73 #include "chrome/browser/tab_contents/tab_util.h" 74 #include "chrome/browser/tab_contents/tab_util.h"
74 #include "chrome/browser/toolkit_extra_parts.h" 75 #include "chrome/browser/toolkit_extra_parts.h"
75 #include "chrome/browser/ui/chrome_select_file_policy.h" 76 #include "chrome/browser/ui/chrome_select_file_policy.h"
76 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" 77 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
77 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 78 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
78 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" 79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h"
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 host->GetChannel()->AddFilter( 720 host->GetChannel()->AddFilter(
720 new SearchProviderInstallStateMessageFilter(id, profile)); 721 new SearchProviderInstallStateMessageFilter(id, profile));
721 host->GetChannel()->AddFilter(new SpellCheckMessageFilter(id)); 722 host->GetChannel()->AddFilter(new SpellCheckMessageFilter(id));
722 #if defined(OS_MACOSX) 723 #if defined(OS_MACOSX)
723 host->GetChannel()->AddFilter(new SpellCheckMessageFilterMac(id)); 724 host->GetChannel()->AddFilter(new SpellCheckMessageFilterMac(id));
724 #endif 725 #endif
725 host->GetChannel()->AddFilter(new ChromeNetBenchmarkingMessageFilter( 726 host->GetChannel()->AddFilter(new ChromeNetBenchmarkingMessageFilter(
726 id, profile, context)); 727 id, profile, context));
727 host->GetChannel()->AddFilter( 728 host->GetChannel()->AddFilter(
728 new prerender::PrerenderMessageFilter(id, profile)); 729 new prerender::PrerenderMessageFilter(id, profile));
730 host->GetChannel()->AddFilter(new TtsMessageFilter(id, profile));
729 731
730 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( 732 host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
731 profile->IsOffTheRecord())); 733 profile->IsOffTheRecord()));
732 734
733 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( 735 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled(
734 IsExtensionActivityLogEnabledForProfile(profile))); 736 IsExtensionActivityLogEnabledForProfile(profile)));
735 737
736 SendExtensionWebRequestStatusToHost(host); 738 SendExtensionWebRequestStatusToHost(host);
737 739
738 RendererContentSettingRules rules; 740 RendererContentSettingRules rules;
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1759 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1758 const Extension* extension = 1760 const Extension* extension =
1759 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host()); 1761 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host());
1760 return extension ? extension->name() : std::string(); 1762 return extension ? extension->name() : std::string();
1761 } 1763 }
1762 1764
1763 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { 1765 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
1764 return g_browser_process->ResourceDispatcherHostCreated(); 1766 return g_browser_process->ResourceDispatcherHostCreated();
1765 } 1767 }
1766 1768
1769 // TODO(tommi): Rename from Get to Create.
1767 content::SpeechRecognitionManagerDelegate* 1770 content::SpeechRecognitionManagerDelegate*
1768 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { 1771 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() {
1769 #if defined(ENABLE_INPUT_SPEECH) 1772 #if defined(ENABLE_INPUT_SPEECH)
1770 return new speech::ChromeSpeechRecognitionManagerDelegate(); 1773 return new speech::ChromeSpeechRecognitionManagerDelegate();
1771 #else 1774 #else
1772 return NULL; 1775 return NULL;
1773 #endif 1776 #endif
1774 } 1777 }
1775 1778
1776 net::NetLog* ChromeContentBrowserClient::GetNetLog() { 1779 net::NetLog* ChromeContentBrowserClient::GetNetLog() {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 #if defined(USE_NSS) 2224 #if defined(USE_NSS)
2222 crypto::CryptoModuleBlockingPasswordDelegate* 2225 crypto::CryptoModuleBlockingPasswordDelegate*
2223 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 2226 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
2224 const GURL& url) { 2227 const GURL& url) {
2225 return chrome::NewCryptoModuleBlockingDialogDelegate( 2228 return chrome::NewCryptoModuleBlockingDialogDelegate(
2226 chrome::kCryptoModulePasswordKeygen, url.host()); 2229 chrome::kCryptoModulePasswordKeygen, url.host());
2227 } 2230 }
2228 #endif 2231 #endif
2229 2232
2230 } // namespace chrome 2233 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/speech/extension_api/tts_engine_extension_api.h » ('j') | chrome/common/all_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698