Index: media/mojo/services/mojo_media_application.h |
diff --git a/media/mojo/services/mojo_media_application.h b/media/mojo/services/mojo_media_application.h |
index ee2b849ecbf42ce840fc3c863e34f200e3c842a0..c92f2d6eadb78e37197efeb68571bcd9950f083d 100644 |
--- a/media/mojo/services/mojo_media_application.h |
+++ b/media/mojo/services/mojo_media_application.h |
@@ -2,6 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/cancelable_callback.h" |
#include "base/memory/scoped_ptr.h" |
#include "media/mojo/interfaces/content_decryption_module.mojom.h" |
#include "media/mojo/interfaces/media_renderer.mojom.h" |
@@ -28,6 +29,7 @@ class MojoMediaApplication |
void Initialize(mojo::ApplicationImpl* app) final; |
bool ConfigureIncomingConnection( |
mojo::ApplicationConnection* connection) final; |
+ void Quit() final; |
// mojo::InterfaceFactory<mojo::ContentDecryptionModule> implementation. |
void Create( |
@@ -38,7 +40,18 @@ class MojoMediaApplication |
void Create(mojo::ApplicationConnection* connection, |
mojo::InterfaceRequest<mojo::MediaRenderer> request) final; |
+ // Sets the app for destruction after a period of idle time. If any top-level |
+ // services (e.g. CDM) are bound before the timeout elapses, it's canceled. |
+ void StartIdleTimer(); |
+ |
+ void OnConnectionError(); |
+ |
MojoCdmServiceContext cdm_service_context_; |
+ mojo::ApplicationImpl* app_impl_; |
+ size_t active_service_count_; |
+ |
+ // Callback used to shut down the app after a period of inactivity. |
+ base::CancelableClosure idle_timeout_callback_; |
}; |
sky
2015/06/24 03:03:31
DISALLOW_...
xhwang
2015/06/26 16:30:07
Done.
|
} // namespace media |