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

Side by Side Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 2063123002: media: Call SetMediaClientAndroid() in content for browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media: Call SetMediaClientAndroid() in content for browser process Created 4 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
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_browser_main_parts.h" 5 #include "chromecast/browser/cast_browser_main_parts.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #if !defined(OS_ANDROID) 59 #if !defined(OS_ANDROID)
60 #include <signal.h> 60 #include <signal.h>
61 #include <sys/prctl.h> 61 #include <sys/prctl.h>
62 #endif 62 #endif
63 #if defined(OS_LINUX) 63 #if defined(OS_LINUX)
64 #include <fontconfig/fontconfig.h> 64 #include <fontconfig/fontconfig.h>
65 #endif 65 #endif
66 66
67 #if defined(OS_ANDROID) 67 #if defined(OS_ANDROID)
68 #include "chromecast/app/android/crash_handler.h" 68 #include "chromecast/app/android/crash_handler.h"
69 #include "chromecast/common/media/cast_media_client_android.h"
70 #include "components/crash/content/browser/crash_dump_manager_android.h" 69 #include "components/crash/content/browser/crash_dump_manager_android.h"
71 #include "media/base/android/media_client_android.h"
72 #include "media/base/media_switches.h" 70 #include "media/base/media_switches.h"
73 #include "net/android/network_change_notifier_factory_android.h" 71 #include "net/android/network_change_notifier_factory_android.h"
74 #else 72 #else
75 #include "chromecast/net/network_change_notifier_factory_cast.h" 73 #include "chromecast/net/network_change_notifier_factory_cast.h"
76 #endif 74 #endif
77 75
78 #if defined(USE_AURA) 76 #if defined(USE_AURA)
79 // gn check ignored on OverlayManagerCast as it's not a public ozone 77 // gn check ignored on OverlayManagerCast as it's not a public ozone
80 // header, but is exported to allow injecting the overlay-composited 78 // header, but is exported to allow injecting the overlay-composited
81 // callback. 79 // callback.
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 kChromeResourceScheme); 376 kChromeResourceScheme);
379 return 0; 377 return 0;
380 } 378 }
381 379
382 void CastBrowserMainParts::PreMainMessageLoopRun() { 380 void CastBrowserMainParts::PreMainMessageLoopRun() {
383 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); 381 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
384 metrics::RegisterPrefs(pref_registry.get()); 382 metrics::RegisterPrefs(pref_registry.get());
385 cast_browser_process_->SetPrefService( 383 cast_browser_process_->SetPrefService(
386 PrefServiceHelper::CreatePrefService(pref_registry.get())); 384 PrefServiceHelper::CreatePrefService(pref_registry.get()));
387 385
388 #if defined(OS_ANDROID) 386 #if !defined(OS_ANDROID)
389 ::media::SetMediaClientAndroid(new media::CastMediaClientAndroid());
390 #else
391 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor()); 387 memory_pressure_monitor_.reset(new CastMemoryPressureMonitor());
392 #endif // defined(OS_ANDROID) 388 #endif // defined(OS_ANDROID)
393 389
394 cast_browser_process_->SetConnectivityChecker( 390 cast_browser_process_->SetConnectivityChecker(
395 ConnectivityChecker::Create( 391 ConnectivityChecker::Create(
396 content::BrowserThread::GetMessageLoopProxyForThread( 392 content::BrowserThread::GetMessageLoopProxyForThread(
397 content::BrowserThread::IO))); 393 content::BrowserThread::IO)));
398 394
399 cast_browser_process_->SetNetLog(net_log_.get()); 395 cast_browser_process_->SetNetLog(net_log_.get());
400 396
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 void CastBrowserMainParts::PostDestroyThreads() { 495 void CastBrowserMainParts::PostDestroyThreads() {
500 #if !defined(OS_ANDROID) 496 #if !defined(OS_ANDROID)
501 media_resource_tracker_->FinalizeAndDestroy(); 497 media_resource_tracker_->FinalizeAndDestroy();
502 media_resource_tracker_ = nullptr; 498 media_resource_tracker_ = nullptr;
503 media_pipeline_backend_manager_.reset(); 499 media_pipeline_backend_manager_.reset();
504 #endif 500 #endif
505 } 501 }
506 502
507 } // namespace shell 503 } // namespace shell
508 } // namespace chromecast 504 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698