OLD | NEW |
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 Loading... |
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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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)); |
729 host->GetChannel()->AddFilter(new ValidationMessageMessageFilter(id)); | 730 host->GetChannel()->AddFilter(new ValidationMessageMessageFilter(id)); |
| 731 #if !defined(OS_ANDROID) |
| 732 host->GetChannel()->AddFilter(new TtsMessageFilter(id, profile)); |
| 733 #endif |
730 | 734 |
731 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 735 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
732 profile->IsOffTheRecord())); | 736 profile->IsOffTheRecord())); |
733 | 737 |
734 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( | 738 host->Send(new ChromeViewMsg_SetExtensionActivityLogEnabled( |
735 IsExtensionActivityLogEnabledForProfile(profile))); | 739 IsExtensionActivityLogEnabledForProfile(profile))); |
736 | 740 |
737 SendExtensionWebRequestStatusToHost(host); | 741 SendExtensionWebRequestStatusToHost(host); |
738 | 742 |
739 RendererContentSettingRules rules; | 743 RendererContentSettingRules rules; |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 1781 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
1778 const Extension* extension = | 1782 const Extension* extension = |
1779 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host()); | 1783 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host()); |
1780 return extension ? extension->name() : std::string(); | 1784 return extension ? extension->name() : std::string(); |
1781 } | 1785 } |
1782 | 1786 |
1783 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { | 1787 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { |
1784 return g_browser_process->ResourceDispatcherHostCreated(); | 1788 return g_browser_process->ResourceDispatcherHostCreated(); |
1785 } | 1789 } |
1786 | 1790 |
| 1791 // TODO(tommi): Rename from Get to Create. |
1787 content::SpeechRecognitionManagerDelegate* | 1792 content::SpeechRecognitionManagerDelegate* |
1788 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { | 1793 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { |
1789 #if defined(ENABLE_INPUT_SPEECH) | 1794 #if defined(ENABLE_INPUT_SPEECH) |
1790 return new speech::ChromeSpeechRecognitionManagerDelegate(); | 1795 return new speech::ChromeSpeechRecognitionManagerDelegate(); |
1791 #else | 1796 #else |
1792 return NULL; | 1797 return NULL; |
1793 #endif | 1798 #endif |
1794 } | 1799 } |
1795 | 1800 |
1796 net::NetLog* ChromeContentBrowserClient::GetNetLog() { | 1801 net::NetLog* ChromeContentBrowserClient::GetNetLog() { |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 #if defined(USE_NSS) | 2247 #if defined(USE_NSS) |
2243 crypto::CryptoModuleBlockingPasswordDelegate* | 2248 crypto::CryptoModuleBlockingPasswordDelegate* |
2244 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2249 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2245 const GURL& url) { | 2250 const GURL& url) { |
2246 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2251 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2247 chrome::kCryptoModulePasswordKeygen, url.host()); | 2252 chrome::kCryptoModulePasswordKeygen, url.host()); |
2248 } | 2253 } |
2249 #endif | 2254 #endif |
2250 | 2255 |
2251 } // namespace chrome | 2256 } // namespace chrome |
OLD | NEW |