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

Unified Diff: third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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: third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc
diff --git a/third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc b/third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc
deleted file mode 100644
index caa9dbebab00fb575b944a72f769b8e389c1b98b..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc
+++ /dev/null
@@ -1,82 +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.
-
-#include "third_party/mojo/src/mojo/edk/system/incoming_endpoint.h"
-
-#include "base/logging.h"
-#include "third_party/mojo/src/mojo/edk/system/channel_endpoint.h"
-#include "third_party/mojo/src/mojo/edk/system/data_pipe.h"
-#include "third_party/mojo/src/mojo/edk/system/message_in_transit.h"
-#include "third_party/mojo/src/mojo/edk/system/message_pipe.h"
-#include "third_party/mojo/src/mojo/edk/system/remote_producer_data_pipe_impl.h"
-
-namespace mojo {
-namespace system {
-
-IncomingEndpoint::IncomingEndpoint() {
-}
-
-scoped_refptr<ChannelEndpoint> IncomingEndpoint::Init() {
- endpoint_ = new ChannelEndpoint(this, 0);
- return endpoint_;
-}
-
-scoped_refptr<MessagePipe> IncomingEndpoint::ConvertToMessagePipe() {
- MutexLocker locker(&mutex_);
- scoped_refptr<MessagePipe> message_pipe(
- MessagePipe::CreateLocalProxyFromExisting(&message_queue_,
- endpoint_.get()));
- DCHECK(message_queue_.IsEmpty());
- endpoint_ = nullptr;
- return message_pipe;
-}
-
-scoped_refptr<DataPipe> IncomingEndpoint::ConvertToDataPipeProducer(
- const MojoCreateDataPipeOptions& validated_options,
- size_t consumer_num_bytes) {
- MutexLocker locker(&mutex_);
- scoped_refptr<DataPipe> data_pipe(DataPipe::CreateRemoteConsumerFromExisting(
- validated_options, consumer_num_bytes, &message_queue_, endpoint_.get()));
- DCHECK(message_queue_.IsEmpty());
- endpoint_ = nullptr;
- return data_pipe;
-}
-
-scoped_refptr<DataPipe> IncomingEndpoint::ConvertToDataPipeConsumer(
- const MojoCreateDataPipeOptions& validated_options) {
- MutexLocker locker(&mutex_);
- scoped_refptr<DataPipe> data_pipe(DataPipe::CreateRemoteProducerFromExisting(
- validated_options, &message_queue_, endpoint_.get()));
- DCHECK(message_queue_.IsEmpty());
- endpoint_ = nullptr;
- return data_pipe;
-}
-
-void IncomingEndpoint::Close() {
- MutexLocker locker(&mutex_);
- if (endpoint_) {
- endpoint_->DetachFromClient();
- endpoint_ = nullptr;
- }
-}
-
-bool IncomingEndpoint::OnReadMessage(unsigned /*port*/,
- MessageInTransit* message) {
- MutexLocker locker(&mutex_);
- if (!endpoint_)
- return false;
-
- message_queue_.AddMessage(make_scoped_ptr(message));
- return true;
-}
-
-void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) {
- Close();
-}
-
-IncomingEndpoint::~IncomingEndpoint() {
-}
-
-} // namespace system
-} // namespace mojo
« no previous file with comments | « third_party/mojo/src/mojo/edk/system/incoming_endpoint.h ('k') | third_party/mojo/src/mojo/edk/system/ipc_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698