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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #include "chrome/common/url_constants.h" | 100 #include "chrome/common/url_constants.h" |
101 #include "chrome/installer/util/google_update_settings.h" | 101 #include "chrome/installer/util/google_update_settings.h" |
102 #include "chromeos/chromeos_constants.h" | 102 #include "chromeos/chromeos_constants.h" |
103 #include "components/nacl/browser/nacl_browser.h" | 103 #include "components/nacl/browser/nacl_browser.h" |
104 #include "components/nacl/browser/nacl_host_message_filter.h" | 104 #include "components/nacl/browser/nacl_host_message_filter.h" |
105 #include "components/nacl/browser/nacl_process_host.h" | 105 #include "components/nacl/browser/nacl_process_host.h" |
106 #include "components/nacl/common/nacl_process_type.h" | 106 #include "components/nacl/common/nacl_process_type.h" |
107 #include "components/nacl/common/nacl_switches.h" | 107 #include "components/nacl/common/nacl_switches.h" |
108 #include "components/translate/core/common/translate_switches.h" | 108 #include "components/translate/core/common/translate_switches.h" |
109 #include "components/user_prefs/pref_registry_syncable.h" | 109 #include "components/user_prefs/pref_registry_syncable.h" |
| 110 #include "content/browser/renderer_host/render_process_host_impl.h" |
110 #include "content/public/browser/browser_child_process_host.h" | 111 #include "content/public/browser/browser_child_process_host.h" |
111 #include "content/public/browser/browser_main_parts.h" | 112 #include "content/public/browser/browser_main_parts.h" |
112 #include "content/public/browser/browser_ppapi_host.h" | 113 #include "content/public/browser/browser_ppapi_host.h" |
113 #include "content/public/browser/browser_thread.h" | 114 #include "content/public/browser/browser_thread.h" |
114 #include "content/public/browser/browser_url_handler.h" | 115 #include "content/public/browser/browser_url_handler.h" |
115 #include "content/public/browser/child_process_data.h" | 116 #include "content/public/browser/child_process_data.h" |
116 #include "content/public/browser/child_process_security_policy.h" | 117 #include "content/public/browser/child_process_security_policy.h" |
117 #include "content/public/browser/render_frame_host.h" | 118 #include "content/public/browser/render_frame_host.h" |
118 #include "content/public/browser/render_process_host.h" | 119 #include "content/public/browser/render_process_host.h" |
119 #include "content/public/browser/render_view_host.h" | 120 #include "content/public/browser/render_view_host.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 168 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
168 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 169 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
169 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 170 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
170 #include "chrome/browser/chromeos/login/startup_utils.h" | 171 #include "chrome/browser/chromeos/login/startup_utils.h" |
171 #include "chrome/browser/chromeos/login/user_manager.h" | 172 #include "chrome/browser/chromeos/login/user_manager.h" |
172 #include "chrome/browser/chromeos/system/input_device_settings.h" | 173 #include "chrome/browser/chromeos/system/input_device_settings.h" |
173 #include "chromeos/chromeos_switches.h" | 174 #include "chromeos/chromeos_switches.h" |
174 #elif defined(OS_LINUX) | 175 #elif defined(OS_LINUX) |
175 #include "chrome/browser/chrome_browser_main_linux.h" | 176 #include "chrome/browser/chrome_browser_main_linux.h" |
176 #elif defined(OS_ANDROID) | 177 #elif defined(OS_ANDROID) |
| 178 #include "chrome/browser/android/gcm_android.h" |
177 #include "chrome/browser/android/new_tab_page_url_handler.h" | 179 #include "chrome/browser/android/new_tab_page_url_handler.h" |
178 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" | 180 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" |
179 #include "chrome/browser/chrome_browser_main_android.h" | 181 #include "chrome/browser/chrome_browser_main_android.h" |
180 #include "chrome/browser/media/encrypted_media_message_filter_android.h" | 182 #include "chrome/browser/media/encrypted_media_message_filter_android.h" |
181 #include "chrome/common/descriptors_android.h" | 183 #include "chrome/common/descriptors_android.h" |
182 #include "components/breakpad/browser/crash_dump_manager_android.h" | 184 #include "components/breakpad/browser/crash_dump_manager_android.h" |
183 #elif defined(OS_POSIX) | 185 #elif defined(OS_POSIX) |
184 #include "chrome/browser/chrome_browser_main_posix.h" | 186 #include "chrome/browser/chrome_browser_main_posix.h" |
185 #endif | 187 #endif |
186 | 188 |
(...skipping 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2215 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { | 2217 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { |
2216 #if defined(ENABLE_INPUT_SPEECH) | 2218 #if defined(ENABLE_INPUT_SPEECH) |
2217 return new speech::ChromeSpeechRecognitionManagerDelegateBubbleUI(); | 2219 return new speech::ChromeSpeechRecognitionManagerDelegateBubbleUI(); |
2218 #else | 2220 #else |
2219 // Platforms who don't implement x-webkit-speech (a.k.a INPUT_SPEECH) just | 2221 // Platforms who don't implement x-webkit-speech (a.k.a INPUT_SPEECH) just |
2220 // need the base delegate without the bubble UI. | 2222 // need the base delegate without the bubble UI. |
2221 return new speech::ChromeSpeechRecognitionManagerDelegate(); | 2223 return new speech::ChromeSpeechRecognitionManagerDelegate(); |
2222 #endif | 2224 #endif |
2223 } | 2225 } |
2224 | 2226 |
| 2227 // FIXME: When this returns an instance of GcmPlatformImplAndroid, this DOES NOT |
| 2228 // transfer ownership, but when it returns an instance of |
| 2229 // PushMessagingServiceImpl, it DOES transfer ownership. Aggh! |
2225 content::PushMessagingService* | 2230 content::PushMessagingService* |
2226 ChromeContentBrowserClient::CreatePushMessagingService( | 2231 ChromeContentBrowserClient::CreatePushMessagingService( |
2227 content::BrowserContext* browser_context) { | 2232 content::RenderProcessHostImpl* rphi) { |
| 2233 #if defined(OS_ANDROID) |
| 2234 GcmPlatformImplAndroid* gcm = GcmPlatformImplAndroid::GetInstance(); |
| 2235 gcm->SetObserver(rphi->push_messaging_message_filter()); |
| 2236 return gcm; |
| 2237 #else |
2228 return new PushMessagingServiceImpl( | 2238 return new PushMessagingServiceImpl( |
2229 Profile::FromBrowserContext(browser_context)); | 2239 Profile::FromBrowserContext(rphi->->GetBrowserContext())); |
| 2240 #endif |
2230 } | 2241 } |
2231 | 2242 |
2232 net::NetLog* ChromeContentBrowserClient::GetNetLog() { | 2243 net::NetLog* ChromeContentBrowserClient::GetNetLog() { |
2233 return g_browser_process->net_log(); | 2244 return g_browser_process->net_log(); |
2234 } | 2245 } |
2235 | 2246 |
2236 AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() { | 2247 AccessTokenStore* ChromeContentBrowserClient::CreateAccessTokenStore() { |
2237 return new ChromeAccessTokenStore(); | 2248 return new ChromeAccessTokenStore(); |
2238 } | 2249 } |
2239 | 2250 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2767 switches::kDisableWebRtcEncryption, | 2778 switches::kDisableWebRtcEncryption, |
2768 }; | 2779 }; |
2769 to_command_line->CopySwitchesFrom(from_command_line, | 2780 to_command_line->CopySwitchesFrom(from_command_line, |
2770 kWebRtcDevSwitchNames, | 2781 kWebRtcDevSwitchNames, |
2771 arraysize(kWebRtcDevSwitchNames)); | 2782 arraysize(kWebRtcDevSwitchNames)); |
2772 } | 2783 } |
2773 } | 2784 } |
2774 #endif // defined(ENABLE_WEBRTC) | 2785 #endif // defined(ENABLE_WEBRTC) |
2775 | 2786 |
2776 } // namespace chrome | 2787 } // namespace chrome |
OLD | NEW |