summaryrefslogtreecommitdiffstats
path: root/mojo/embedder/platform_channel_pair.cc
blob: 783ced8b71130f68129a4403f66d39fbebe8bec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// 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 "mojo/embedder/platform_channel_pair.h"

#include "base/logging.h"

namespace mojo {
namespace embedder {

const char PlatformChannelPair::kMojoPlatformChannelHandleSwitch[] =
    "mojo-platform-channel-handle";

PlatformChannelPair::~PlatformChannelPair() {
}

ScopedPlatformHandle PlatformChannelPair::PassServerHandle() {
  return server_handle_.Pass();
}

ScopedPlatformHandle PlatformChannelPair::PassClientHandle() {
  return client_handle_.Pass();
}

void PlatformChannelPair::ChildProcessLaunched() {
  DCHECK(client_handle_.is_valid());
  client_handle_.reset();
}

}  // namespace embedder
}  // namespace mojo