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

Unified Diff: mojo/edk/system/channel_manager.h

Issue 1462083003: Add //mojo/edk/platform and move platform_task_runners.h there. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update readme Created 5 years, 1 month 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/edk/system/channel_manager.h
diff --git a/mojo/edk/system/channel_manager.h b/mojo/edk/system/channel_manager.h
index 8ea36c77010d8dbc171fc1e8ea833d436056b085..82f95b3fb698ef232cf546abb8919de0611a5b98 100644
--- a/mojo/edk/system/channel_manager.h
+++ b/mojo/edk/system/channel_manager.h
@@ -10,8 +10,8 @@
#include <unordered_map>
#include "base/callback_forward.h"
-#include "mojo/edk/embedder/platform_task_runner.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/platform/task_runner.h"
#include "mojo/edk/system/channel_id.h"
#include "mojo/edk/util/mutex.h"
#include "mojo/edk/util/ref_ptr.h"
@@ -44,10 +44,9 @@ class ChannelManager {
// which this channel manager will create all channels. Connection manager is
// optional and may be null. All arguments (if non-null) must remain alive at
// least until after shutdown completion.
- ChannelManager(
- embedder::PlatformSupport* platform_support,
- util::RefPtr<embedder::PlatformTaskRunner>&& io_thread_task_runner,
- ConnectionManager* connection_manager);
+ ChannelManager(embedder::PlatformSupport* platform_support,
+ util::RefPtr<platform::TaskRunner>&& io_thread_task_runner,
+ ConnectionManager* connection_manager);
~ChannelManager();
// Shuts down the channel manager, including shutting down all channels (as if
@@ -66,7 +65,7 @@ class ChannelManager {
// (in tests).
void Shutdown(
const base::Closure& callback,
- util::RefPtr<embedder::PlatformTaskRunner>&& callback_thread_task_runner);
+ util::RefPtr<platform::TaskRunner>&& callback_thread_task_runner);
// Creates a |Channel| and adds it to the set of channels managed by this
// |ChannelManager|. This must be called from the I/O thread (given to the
@@ -93,7 +92,7 @@ class ChannelManager {
ChannelId channel_id,
embedder::ScopedPlatformHandle platform_handle,
const base::Closure& callback,
- util::RefPtr<embedder::PlatformTaskRunner>&& callback_thread_task_runner);
+ util::RefPtr<platform::TaskRunner>&& callback_thread_task_runner);
// Gets the |Channel| with the given ID (which must exist).
util::RefPtr<Channel> GetChannel(ChannelId channel_id) const;
@@ -118,7 +117,7 @@ class ChannelManager {
void ShutdownChannel(
ChannelId channel_id,
const base::Closure& callback,
- util::RefPtr<embedder::PlatformTaskRunner>&& callback_thread_task_runner);
+ util::RefPtr<platform::TaskRunner>&& callback_thread_task_runner);
ConnectionManager* connection_manager() const { return connection_manager_; }
@@ -128,7 +127,7 @@ class ChannelManager {
// that doesn't work with |base::Bind()|.
void ShutdownHelper(
const base::Closure& callback,
- util::RefPtr<embedder::PlatformTaskRunner> callback_thread_task_runner);
+ util::RefPtr<platform::TaskRunner> callback_thread_task_runner);
// Used by |CreateChannelOnIOThread()| and |CreateChannelHelper()|. Called on
// the I/O thread. |bootstrap_channel_endpoint| is optional and may be null.
@@ -147,11 +146,11 @@ class ChannelManager {
embedder::ScopedPlatformHandle platform_handle,
util::RefPtr<ChannelEndpoint> bootstrap_channel_endpoint,
const base::Closure& callback,
- util::RefPtr<embedder::PlatformTaskRunner> callback_thread_task_runner);
+ util::RefPtr<platform::TaskRunner> callback_thread_task_runner);
// Note: These must not be used after shutdown.
embedder::PlatformSupport* const platform_support_;
- const util::RefPtr<embedder::PlatformTaskRunner> io_thread_task_runner_;
+ const util::RefPtr<platform::TaskRunner> io_thread_task_runner_;
ConnectionManager* const connection_manager_;
// Note: |Channel| methods should not be called under |mutex_|.

Powered by Google App Engine
This is Rietveld 408576698