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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "chrome/browser/profiles/profile.h" | 60 #include "chrome/browser/profiles/profile.h" |
61 #include "chrome/browser/profiles/profile_io_data.h" | 61 #include "chrome/browser/profiles/profile_io_data.h" |
62 #include "chrome/browser/profiles/profile_manager.h" | 62 #include "chrome/browser/profiles/profile_manager.h" |
63 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 63 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
64 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 64 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
65 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 65 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
66 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 66 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
67 #include "chrome/browser/signin/signin_manager.h" | 67 #include "chrome/browser/signin/signin_manager.h" |
68 #include "chrome/browser/signin/signin_manager_factory.h" | 68 #include "chrome/browser/signin/signin_manager_factory.h" |
69 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 69 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 70 #include "chrome/browser/speech/tts_request_handler.h" |
70 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 71 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
71 #include "chrome/browser/ssl/ssl_add_certificate.h" | 72 #include "chrome/browser/ssl/ssl_add_certificate.h" |
72 #include "chrome/browser/ssl/ssl_blocking_page.h" | 73 #include "chrome/browser/ssl/ssl_blocking_page.h" |
73 #include "chrome/browser/ssl/ssl_tab_helper.h" | 74 #include "chrome/browser/ssl/ssl_tab_helper.h" |
74 #include "chrome/browser/tab_contents/tab_util.h" | 75 #include "chrome/browser/tab_contents/tab_util.h" |
75 #include "chrome/browser/toolkit_extra_parts.h" | 76 #include "chrome/browser/toolkit_extra_parts.h" |
76 #include "chrome/browser/ui/chrome_select_file_policy.h" | 77 #include "chrome/browser/ui/chrome_select_file_policy.h" |
77 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 78 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
78 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 79 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
79 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 80 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 1684 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
1684 const Extension* extension = | 1685 const Extension* extension = |
1685 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host()); | 1686 io_data->GetExtensionInfoMap()->extensions().GetByID(url.host()); |
1686 return extension ? extension->name() : std::string(); | 1687 return extension ? extension->name() : std::string(); |
1687 } | 1688 } |
1688 | 1689 |
1689 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { | 1690 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { |
1690 return g_browser_process->ResourceDispatcherHostCreated(); | 1691 return g_browser_process->ResourceDispatcherHostCreated(); |
1691 } | 1692 } |
1692 | 1693 |
| 1694 // TODO(tommi): Rename from Get to Create. |
1693 content::SpeechRecognitionManagerDelegate* | 1695 content::SpeechRecognitionManagerDelegate* |
1694 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { | 1696 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { |
1695 #if defined(ENABLE_INPUT_SPEECH) | 1697 #if defined(ENABLE_INPUT_SPEECH) |
1696 return new speech::ChromeSpeechRecognitionManagerDelegate(); | 1698 return new speech::ChromeSpeechRecognitionManagerDelegate(); |
1697 #else | 1699 #else |
1698 return NULL; | 1700 return NULL; |
1699 #endif | 1701 #endif |
1700 } | 1702 } |
1701 | 1703 |
| 1704 scoped_ptr<content::TtsDispatcherHostDelegate> |
| 1705 ChromeContentBrowserClient::CreateTtsDispatcherHostDelegate() { |
| 1706 return scoped_ptr<content::TtsDispatcherHostDelegate>( |
| 1707 new TtsRequestHandler()); |
| 1708 } |
| 1709 |
1702 net::NetLog* ChromeContentBrowserClient::GetNetLog() { | 1710 net::NetLog* ChromeContentBrowserClient::GetNetLog() { |
1703 return g_browser_process->net_log(); | 1711 return g_browser_process->net_log(); |
1704 } | 1712 } |
1705 | 1713 |
1706 AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() { | 1714 AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() { |
1707 return new ChromeAccessTokenStore(); | 1715 return new ChromeAccessTokenStore(); |
1708 } | 1716 } |
1709 | 1717 |
1710 bool ChromeContentBrowserClient::IsFastShutdownPossible() { | 1718 bool ChromeContentBrowserClient::IsFastShutdownPossible() { |
1711 return true; | 1719 return true; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 io_thread_application_locale_ = locale; | 2131 io_thread_application_locale_ = locale; |
2124 } | 2132 } |
2125 | 2133 |
2126 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 2134 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
2127 const std::string& locale) { | 2135 const std::string& locale) { |
2128 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
2129 io_thread_application_locale_ = locale; | 2137 io_thread_application_locale_ = locale; |
2130 } | 2138 } |
2131 | 2139 |
2132 } // namespace chrome | 2140 } // namespace chrome |
OLD | NEW |