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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 #endif | 233 #endif |
234 | 234 |
235 #if defined(ENABLE_SPELLCHECK) | 235 #if defined(ENABLE_SPELLCHECK) |
236 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 236 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
237 #endif | 237 #endif |
238 | 238 |
239 #if defined(ENABLE_WEBRTC) | 239 #if defined(ENABLE_WEBRTC) |
240 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 240 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
241 #endif | 241 #endif |
242 | 242 |
| 243 #if defined(ENABLE_MEDIA_ROUTER) |
| 244 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
| 245 #endif |
| 246 |
243 using base::FileDescriptor; | 247 using base::FileDescriptor; |
244 using blink::WebWindowFeatures; | 248 using blink::WebWindowFeatures; |
245 using content::AccessTokenStore; | 249 using content::AccessTokenStore; |
246 using content::BrowserThread; | 250 using content::BrowserThread; |
247 using content::BrowserURLHandler; | 251 using content::BrowserURLHandler; |
248 using content::ChildProcessSecurityPolicy; | 252 using content::ChildProcessSecurityPolicy; |
249 using content::QuotaPermissionContext; | 253 using content::QuotaPermissionContext; |
250 using content::RenderFrameHost; | 254 using content::RenderFrameHost; |
251 using content::RenderViewHost; | 255 using content::RenderViewHost; |
252 using content::ResourceType; | 256 using content::ResourceType; |
(...skipping 2101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 Navigate(&nav_params); | 2358 Navigate(&nav_params); |
2355 callback.Run(nav_params.target_contents); | 2359 callback.Run(nav_params.target_contents); |
2356 #elif defined(OS_ANDROID) | 2360 #elif defined(OS_ANDROID) |
2357 service_tab_launcher::ServiceTabLauncher::GetInstance()->LaunchTab( | 2361 service_tab_launcher::ServiceTabLauncher::GetInstance()->LaunchTab( |
2358 browser_context, params, callback); | 2362 browser_context, params, callback); |
2359 #else | 2363 #else |
2360 NOTIMPLEMENTED(); | 2364 NOTIMPLEMENTED(); |
2361 #endif | 2365 #endif |
2362 } | 2366 } |
2363 | 2367 |
| 2368 content::PresentationServiceDelegate* |
| 2369 ChromeContentBrowserClient::GetPresentationServiceDelegate( |
| 2370 content::WebContents* web_contents) { |
| 2371 #if defined(ENABLE_MEDIA_ROUTER) |
| 2372 if (switches::MediaRouterEnabled()) { |
| 2373 return media_router::PresentationServiceDelegateImpl:: |
| 2374 GetOrCreateForWebContents(web_contents); |
| 2375 } |
| 2376 #endif |
| 2377 return nullptr; |
| 2378 } |
| 2379 |
2364 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 2380 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
2365 const GURL& url) { | 2381 const GURL& url) { |
2366 if (url.is_valid()) { | 2382 if (url.is_valid()) { |
2367 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 2383 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
2368 metric, url); | 2384 metric, url); |
2369 } | 2385 } |
2370 } | 2386 } |
2371 | 2387 |
2372 content::DevToolsManagerDelegate* | 2388 content::DevToolsManagerDelegate* |
2373 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2389 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 switches::kDisableWebRtcEncryption, | 2458 switches::kDisableWebRtcEncryption, |
2443 }; | 2459 }; |
2444 to_command_line->CopySwitchesFrom(from_command_line, | 2460 to_command_line->CopySwitchesFrom(from_command_line, |
2445 kWebRtcDevSwitchNames, | 2461 kWebRtcDevSwitchNames, |
2446 arraysize(kWebRtcDevSwitchNames)); | 2462 arraysize(kWebRtcDevSwitchNames)); |
2447 } | 2463 } |
2448 } | 2464 } |
2449 #endif // defined(ENABLE_WEBRTC) | 2465 #endif // defined(ENABLE_WEBRTC) |
2450 | 2466 |
2451 } // namespace chrome | 2467 } // namespace chrome |
OLD | NEW |