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

Unified Diff: mojo/common/channel_init.h

Issue 346633002: Move channel_init out of mojo_common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix gn build Created 6 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/common/channel_init.h
diff --git a/mojo/common/channel_init.h b/mojo/common/channel_init.h
deleted file mode 100644
index ca134cb233dc90d470a1a22b4e763cc581fc3225..0000000000000000000000000000000000000000
--- a/mojo/common/channel_init.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_COMMON_CHANNEL_INIT_H_
-#define MOJO_COMMON_CHANNEL_INIT_H_
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
-#include "mojo/common/mojo_common_export.h"
-#include "mojo/public/cpp/system/core.h"
-
-namespace base {
-class MessageLoopProxy;
-class TaskRunner;
-}
-
-namespace mojo {
-namespace embedder {
-struct ChannelInfo;
-}
-
-namespace common {
-
-// ChannelInit handle creation (and destruction) of the mojo channel. It is
-// expected that this class is created and destroyed on the main thread.
-class MOJO_COMMON_EXPORT ChannelInit {
- public:
- ChannelInit();
- ~ChannelInit();
-
- // Initializes the channel. This takes ownership of |file|. Returns the
- // primordial MessagePipe for the channel.
- mojo::ScopedMessagePipeHandle Init(
- base::PlatformFile file,
- scoped_refptr<base::TaskRunner> io_thread_task_runner);
-
- private:
- // Invoked on the main thread once the channel has been established.
- static void OnCreatedChannel(
- base::WeakPtr<ChannelInit> host,
- scoped_refptr<base::TaskRunner> io_thread,
- embedder::ChannelInfo* channel);
-
- scoped_refptr<base::TaskRunner> io_thread_task_runner_;
-
- // If non-null the channel has been established.
- embedder::ChannelInfo* channel_info_;
-
- base::WeakPtrFactory<ChannelInit> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ChannelInit);
-};
-
-} // namespace common
-} // namespace mojo
-
-#endif // MOJO_COMMON_CHANNEL_INIT_H_
« no previous file with comments | « mojo/common/DEPS ('k') | mojo/common/channel_init.cc » ('j') | mojo/embedder/channel_init.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698