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 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2355 Navigate(&nav_params); | 2359 Navigate(&nav_params); |
2356 callback.Run(nav_params.target_contents); | 2360 callback.Run(nav_params.target_contents); |
2357 #elif defined(OS_ANDROID) | 2361 #elif defined(OS_ANDROID) |
2358 service_tab_launcher::ServiceTabLauncher::GetInstance()->LaunchTab( | 2362 service_tab_launcher::ServiceTabLauncher::GetInstance()->LaunchTab( |
2359 browser_context, params, callback); | 2363 browser_context, params, callback); |
2360 #else | 2364 #else |
2361 NOTIMPLEMENTED(); | 2365 NOTIMPLEMENTED(); |
2362 #endif | 2366 #endif |
2363 } | 2367 } |
2364 | 2368 |
| 2369 content::PresentationServiceDelegate* |
| 2370 ChromeContentBrowserClient::GetPresentationServiceDelegate( |
| 2371 content::WebContents* web_contents) { |
| 2372 #if defined(ENABLE_MEDIA_ROUTER) |
| 2373 if (switches::MediaRouterEnabled()) { |
| 2374 return media_router::PresentationServiceDelegateImpl:: |
| 2375 GetOrCreateForWebContents(web_contents); |
| 2376 } |
| 2377 return nullptr; |
| 2378 #else |
| 2379 return nullptr; |
| 2380 #endif |
| 2381 } |
| 2382 |
2365 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, | 2383 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, |
2366 const GURL& url) { | 2384 const GURL& url) { |
2367 if (url.is_valid()) { | 2385 if (url.is_valid()) { |
2368 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 2386 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
2369 metric, url); | 2387 metric, url); |
2370 } | 2388 } |
2371 } | 2389 } |
2372 | 2390 |
2373 content::DevToolsManagerDelegate* | 2391 content::DevToolsManagerDelegate* |
2374 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2392 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 switches::kDisableWebRtcEncryption, | 2461 switches::kDisableWebRtcEncryption, |
2444 }; | 2462 }; |
2445 to_command_line->CopySwitchesFrom(from_command_line, | 2463 to_command_line->CopySwitchesFrom(from_command_line, |
2446 kWebRtcDevSwitchNames, | 2464 kWebRtcDevSwitchNames, |
2447 arraysize(kWebRtcDevSwitchNames)); | 2465 arraysize(kWebRtcDevSwitchNames)); |
2448 } | 2466 } |
2449 } | 2467 } |
2450 #endif // defined(ENABLE_WEBRTC) | 2468 #endif // defined(ENABLE_WEBRTC) |
2451 | 2469 |
2452 } // namespace chrome | 2470 } // namespace chrome |
OLD | NEW |