Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1149293008: [MediaRouter] Adds GetPresentationServiceDelegate impl to ChromeContentBrowserClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 return nullptr;
2377 #else
2378 return nullptr;
2379 #endif
mark a. foltz 2015/06/05 22:22:19 Remove duplicate line by putting #endif before ret
mark a. foltz 2015/06/05 22:22:19 #endif // defined(ENABLE_MEDIA_ROUTER)
haibinlu 2015/06/06 02:37:33 Done.
haibinlu 2015/06/06 02:37:33 #if is very close by.
2380 }
2381
2364 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric, 2382 void ChromeContentBrowserClient::RecordURLMetric(const std::string& metric,
2365 const GURL& url) { 2383 const GURL& url) {
2366 if (url.is_valid()) { 2384 if (url.is_valid()) {
2367 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), 2385 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
2368 metric, url); 2386 metric, url);
2369 } 2387 }
2370 } 2388 }
2371 2389
2372 content::DevToolsManagerDelegate* 2390 content::DevToolsManagerDelegate*
2373 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { 2391 ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 switches::kDisableWebRtcEncryption, 2460 switches::kDisableWebRtcEncryption,
2443 }; 2461 };
2444 to_command_line->CopySwitchesFrom(from_command_line, 2462 to_command_line->CopySwitchesFrom(from_command_line,
2445 kWebRtcDevSwitchNames, 2463 kWebRtcDevSwitchNames,
2446 arraysize(kWebRtcDevSwitchNames)); 2464 arraysize(kWebRtcDevSwitchNames));
2447 } 2465 }
2448 } 2466 }
2449 #endif // defined(ENABLE_WEBRTC) 2467 #endif // defined(ENABLE_WEBRTC)
2450 2468
2451 } // namespace chrome 2469 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/media/router/presentation_service_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698