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

Unified Diff: components/arc/arc_session.h

Issue 2436763004: More graceful shutdown for ArcSession. (Closed)
Patch Set: Add StopArcInstance Created 4 years, 2 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
« no previous file with comments | « components/arc/arc_service_manager.cc ('k') | components/arc/arc_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_session.h
diff --git a/components/arc/arc_session.h b/components/arc/arc_session.h
index 0e6e34b9dd23e702e8148310b8f061fc1c140327..9d82e77657890efa0028dcdcc8a9f0c110596167 100644
--- a/components/arc/arc_session.h
+++ b/components/arc/arc_session.h
@@ -8,9 +8,11 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
+#include "base/task_runner.h"
#include "components/arc/arc_bridge_service.h"
namespace arc {
@@ -41,7 +43,8 @@ class ArcSession {
};
// Creates a default instance of ArcSession.
- static std::unique_ptr<ArcSession> Create();
+ static std::unique_ptr<ArcSession> Create(
+ const scoped_refptr<base::TaskRunner>& blocking_task_runner);
virtual ~ArcSession();
// Starts and bootstraps a connection with the instance. The Observer's
@@ -53,6 +56,10 @@ class ArcSession {
// The completion is notified via OnStopped() of the Delegate.
virtual void Stop() = 0;
+ // Called when Chrome is in shutdown state. This is called when the message
+ // loop is already stopped, and the instance will soon be deleted.
+ virtual void OnShutdown() = 0;
+
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
« no previous file with comments | « components/arc/arc_service_manager.cc ('k') | components/arc/arc_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698