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

Unified Diff: mojo/application/public/cpp/app_lifetime_helper.h

Issue 1200323003: media: Quit MojoMediaApplication when no service is bound. (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 side-by-side diff with in-line comments
Download patch
Index: mojo/application/public/cpp/app_lifetime_helper.h
diff --git a/mojo/application/public/cpp/app_lifetime_helper.h b/mojo/application/public/cpp/app_lifetime_helper.h
index 93005ef45b14437ada131bfb54a3e339a7adb81b..dbbca18e63fc396f9c3f9c3b850185a2342f1170 100644
--- a/mojo/application/public/cpp/app_lifetime_helper.h
+++ b/mojo/application/public/cpp/app_lifetime_helper.h
@@ -34,11 +34,16 @@ class AppRefCount {
friend AppLifetimeHelper;
AppRefCount(AppLifetimeHelper* app_lifetime_helper,
+ base::TimeDelta release_delay_,
scoped_refptr<base::SingleThreadTaskRunner> app_task_runner);
// Don't need to use weak ptr because if the app thread is alive that means
// app is.
AppLifetimeHelper* app_lifetime_helper_;
+
+ // Delay before releasing the ref-count.
+ base::TimeDelta release_delay_;
+
scoped_refptr<base::SingleThreadTaskRunner> app_task_runner_;
#ifndef NDEBUG
@@ -61,6 +66,7 @@ class AppLifetimeHelper {
~AppLifetimeHelper();
scoped_ptr<AppRefCount> CreateAppRefCount();
+ scoped_ptr<AppRefCount> CreateAppRefCount(base::TimeDelta release_delay);
private:
friend AppRefCount;

Powered by Google App Engine
This is Rietveld 408576698