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

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

Issue 1871253002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 4 years, 8 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 <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "net/android/network_change_notifier_factory_android.h" 72 #include "net/android/network_change_notifier_factory_android.h"
73 #else 73 #else
74 #include "chromecast/net/network_change_notifier_factory_cast.h" 74 #include "chromecast/net/network_change_notifier_factory_cast.h"
75 #endif 75 #endif
76 76
77 #if defined(USE_AURA) 77 #if defined(USE_AURA)
78 // gn check ignored on OverlayManagerCast as it's not a public ozone 78 // gn check ignored on OverlayManagerCast as it's not a public ozone
79 // header, but is exported to allow injecting the overlay-composited 79 // header, but is exported to allow injecting the overlay-composited
80 // callback. 80 // callback.
81 #include "chromecast/graphics/cast_screen.h" 81 #include "chromecast/graphics/cast_screen.h"
82 #include "ui/aura/env.h"
83 #include "ui/gfx/screen.h" 82 #include "ui/gfx/screen.h"
84 #include "ui/ozone/platform/cast/overlay_manager_cast.h" // nogncheck 83 #include "ui/ozone/platform/cast/overlay_manager_cast.h" // nogncheck
85 #endif 84 #endif
86 85
87 namespace { 86 namespace {
88 87
89 #if !defined(OS_ANDROID) 88 #if !defined(OS_ANDROID)
90 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, }; 89 int kSignalsToRunClosure[] = { SIGTERM, SIGINT, };
91 // Closure to run on SIGTERM and SIGINT. 90 // Closure to run on SIGTERM and SIGINT.
92 base::Closure* g_signal_closure = nullptr; 91 base::Closure* g_signal_closure = nullptr;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 477
479 void CastBrowserMainParts::PostMainMessageLoopRun() { 478 void CastBrowserMainParts::PostMainMessageLoopRun() {
480 #if defined(OS_ANDROID) 479 #if defined(OS_ANDROID)
481 // Android does not use native main MessageLoop. 480 // Android does not use native main MessageLoop.
482 NOTREACHED(); 481 NOTREACHED();
483 #else 482 #else
484 cast_browser_process_->cast_service()->Finalize(); 483 cast_browser_process_->cast_service()->Finalize();
485 cast_browser_process_->metrics_service_client()->Finalize(); 484 cast_browser_process_->metrics_service_client()->Finalize();
486 cast_browser_process_.reset(); 485 cast_browser_process_.reset();
487 486
488 #if defined(USE_AURA)
489 aura::Env::DeleteInstance();
490 #endif
491
492 DeregisterKillOnAlarm(); 487 DeregisterKillOnAlarm();
493 #endif 488 #endif
494 } 489 }
495 490
496 void CastBrowserMainParts::PostDestroyThreads() { 491 void CastBrowserMainParts::PostDestroyThreads() {
497 #if !defined(OS_ANDROID) 492 #if !defined(OS_ANDROID)
498 media_resource_tracker_->FinalizeAndDestroy(); 493 media_resource_tracker_->FinalizeAndDestroy();
499 media_resource_tracker_ = nullptr; 494 media_resource_tracker_ = nullptr;
500 media_pipeline_backend_manager_.reset(); 495 media_pipeline_backend_manager_.reset();
501 #endif 496 #endif
502 } 497 }
503 498
504 } // namespace shell 499 } // namespace shell
505 } // namespace chromecast 500 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/test/base/view_event_test_platform_part_default.cc ('k') | content/browser/browser_main_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698