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

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

Issue 1223793009: Fixes to Cast use of overlays for video frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated for move/rename of CmaMessageLoop Created 5 years, 5 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 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 <string> 7 #include <string>
8 #if !defined(OS_ANDROID) 8 #if !defined(OS_ANDROID)
9 #include <signal.h> 9 #include <signal.h>
10 #include <sys/prctl.h> 10 #include <sys/prctl.h>
(...skipping 16 matching lines...) Expand all
27 #include "chromecast/browser/cast_browser_process.h" 27 #include "chromecast/browser/cast_browser_process.h"
28 #include "chromecast/browser/cast_net_log.h" 28 #include "chromecast/browser/cast_net_log.h"
29 #include "chromecast/browser/devtools/remote_debugging_server.h" 29 #include "chromecast/browser/devtools/remote_debugging_server.h"
30 #include "chromecast/browser/metrics/cast_metrics_prefs.h" 30 #include "chromecast/browser/metrics/cast_metrics_prefs.h"
31 #include "chromecast/browser/metrics/cast_metrics_service_client.h" 31 #include "chromecast/browser/metrics/cast_metrics_service_client.h"
32 #include "chromecast/browser/pref_service_helper.h" 32 #include "chromecast/browser/pref_service_helper.h"
33 #include "chromecast/browser/service/cast_service.h" 33 #include "chromecast/browser/service/cast_service.h"
34 #include "chromecast/browser/url_request_context_factory.h" 34 #include "chromecast/browser/url_request_context_factory.h"
35 #include "chromecast/common/platform_client_auth.h" 35 #include "chromecast/common/platform_client_auth.h"
36 #include "chromecast/media/base/key_systems_common.h" 36 #include "chromecast/media/base/key_systems_common.h"
37 #include "chromecast/media/base/media_message_loop.h"
37 #include "chromecast/net/connectivity_checker.h" 38 #include "chromecast/net/connectivity_checker.h"
38 #include "chromecast/public/cast_media_shlib.h" 39 #include "chromecast/public/cast_media_shlib.h"
39 #include "chromecast/public/cast_sys_info.h" 40 #include "chromecast/public/cast_sys_info.h"
40 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/gpu_data_manager.h" 42 #include "content/public/browser/gpu_data_manager.h"
42 #include "content/public/common/content_switches.h" 43 #include "content/public/common/content_switches.h"
43 #include "media/audio/audio_manager.h" 44 #include "media/audio/audio_manager.h"
44 #include "media/audio/audio_manager_factory.h" 45 #include "media/audio/audio_manager_factory.h"
45 #include "media/base/browser_cdm_factory.h" 46 #include "media/base/browser_cdm_factory.h"
46 #include "media/base/media.h" 47 #include "media/base/media.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 content::BrowserThread::GetBlockingPool(), 318 content::BrowserThread::GetBlockingPool(),
318 cast_browser_process_->pref_service(), 319 cast_browser_process_->pref_service(),
319 cast_browser_process_->browser_context()->GetRequestContext())); 320 cast_browser_process_->browser_context()->GetRequestContext()));
320 321
321 if (!PlatformClientAuth::Initialize()) 322 if (!PlatformClientAuth::Initialize())
322 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; 323 LOG(ERROR) << "PlatformClientAuth::Initialize failed.";
323 324
324 cast_browser_process_->SetRemoteDebuggingServer( 325 cast_browser_process_->SetRemoteDebuggingServer(
325 make_scoped_ptr(new RemoteDebuggingServer())); 326 make_scoped_ptr(new RemoteDebuggingServer()));
326 327
327 media::CastMediaShlib::Initialize(cmd_line->argv()); 328 media::CastMediaShlib::Initialize(cmd_line->argv());
gunsch 2015/07/08 16:02:52 do we also want to post this to the media thread?
halliwell 2015/07/08 17:17:40 Yes, done - I think it would be great to be able t
328 ::media::InitializeMediaLibrary(); 329 ::media::InitializeMediaLibrary();
329 330
330 cast_browser_process_->SetCastService(CastService::Create( 331 cast_browser_process_->SetCastService(CastService::Create(
331 cast_browser_process_->browser_context(), 332 cast_browser_process_->browser_context(),
332 cast_browser_process_->pref_service(), 333 cast_browser_process_->pref_service(),
333 cast_browser_process_->metrics_service_client(), 334 cast_browser_process_->metrics_service_client(),
334 url_request_context_factory_->GetSystemGetter())); 335 url_request_context_factory_->GetSystemGetter()));
335 cast_browser_process_->cast_service()->Initialize(); 336 cast_browser_process_->cast_service()->Initialize();
336 337
337 // Initializing metrics service and network delegates must happen after cast 338 // Initializing metrics service and network delegates must happen after cast
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 cast_browser_process_->metrics_service_client()->Finalize(); 384 cast_browser_process_->metrics_service_client()->Finalize();
384 cast_browser_process_.reset(); 385 cast_browser_process_.reset();
385 386
386 #if defined(USE_AURA) 387 #if defined(USE_AURA)
387 aura::Env::DeleteInstance(); 388 aura::Env::DeleteInstance();
388 #endif 389 #endif
389 390
390 DeregisterKillOnAlarm(); 391 DeregisterKillOnAlarm();
391 #endif 392 #endif
392 393
393 media::CastMediaShlib::Finalize(); 394 // Finalize CastMediaShlib on media thread to ensure it's not accessed
395 // after Finalize.
396 chromecast::media::MediaMessageLoop::GetTaskRunner()->PostTask(
397 FROM_HERE, base::Bind(&media::CastMediaShlib::Finalize));
394 } 398 }
395 399
396 } // namespace shell 400 } // namespace shell
397 } // namespace chromecast 401 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/cma/filters/hole_frame_factory.h » ('j') | ui/ozone/platform/cast/overlay_manager_cast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698