Skip to content

Commit

Permalink
[remoting host] Move mojo IPC stuff to a subdirectory
Browse files Browse the repository at this point in the history
Change-Id: I2ea7b1e840abf4dd73da0981ef64e0ca39d8074c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3142136
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#919567}
  • Loading branch information
ywh233 authored and Chromium LUCI CQ committed Sep 9, 2021
1 parent 8efd07e commit e145289
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 31 deletions.
12 changes: 4 additions & 8 deletions remoting/host/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ static_library("common") {
"ipc_mouse_cursor_monitor.h",
"ipc_screen_controls.cc",
"ipc_screen_controls.h",
"ipc_server.h",
"ipc_url_forwarder_configurator.cc",
"ipc_url_forwarder_configurator.h",
"ipc_video_frame_capturer.cc",
Expand All @@ -366,8 +365,6 @@ static_library("common") {
"it2me_desktop_environment.h",
"keyboard_layout_monitor.cc",
"keyboard_layout_monitor.h",
"mojo_ipc_server.cc",
"mojo_ipc_server.h",
"mouse_cursor_monitor_proxy.cc",
"mouse_cursor_monitor_proxy.h",
"mouse_shape_pump.cc",
Expand Down Expand Up @@ -451,6 +448,7 @@ static_library("common") {
"//remoting/base:authorization",
"//remoting/host/file_transfer:common",
"//remoting/host/input_monitor",
"//remoting/host/mojo_ipc",
"//remoting/host/mojom",
"//remoting/host/security_key",
"//remoting/proto/ftl/v1:ftl_messages",
Expand Down Expand Up @@ -667,8 +665,6 @@ static_library("test_support") {
"fake_desktop_environment.h",
"fake_host_extension.cc",
"fake_host_extension.h",
"fake_ipc_server.cc",
"fake_ipc_server.h",
"fake_keyboard_layout_monitor.cc",
"fake_keyboard_layout_monitor.h",
"fake_mouse_cursor_monitor.cc",
Expand All @@ -677,8 +673,6 @@ static_library("test_support") {
"fake_url_forwarder_configurator.h",
"host_mock_objects.cc",
"host_mock_objects.h",
"mojo_ipc_test_util.cc",
"mojo_ipc_test_util.h",
]

configs += [ "//remoting/build/config:version" ]
Expand Down Expand Up @@ -737,7 +731,6 @@ source_set("unit_tests") {
"it2me/it2me_confirmation_dialog_proxy_unittest.cc",
"it2me/it2me_host_unittest.cc",
"it2me/it2me_native_messaging_host_unittest.cc",
"mojo_ipc_server_unittest.cc",
"mouse_cursor_monitor_proxy_unittest.cc",
"mouse_shape_pump_unittest.cc",
"native_messaging/native_messaging_reader_unittest.cc",
Expand Down Expand Up @@ -781,6 +774,9 @@ source_set("unit_tests") {
"//remoting/host/input_monitor:input_monitor",
"//remoting/host/it2me:common",
"//remoting/host/it2me:constants",
"//remoting/host/mojo_ipc",
"//remoting/host/mojo_ipc:test_support",
"//remoting/host/mojo_ipc:unit_tests",
"//remoting/host/mojom",
"//remoting/host/native_messaging",
"//remoting/host/security_key:unit_tests",
Expand Down
51 changes: 51 additions & 0 deletions remoting/host/mojo_ipc/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2021 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.

static_library("mojo_ipc") {
sources = [
"ipc_server.h",
"mojo_ipc_server.cc",
"mojo_ipc_server.h",
]
deps = [
"//base",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/platform",
"//mojo/public/cpp/system",
]
}

static_library("test_support") {
testonly = true

sources = [
"fake_ipc_server.cc",
"fake_ipc_server.h",
"mojo_ipc_test_util.cc",
"mojo_ipc_test_util.h",
]
deps = [
":mojo_ipc",
"//base",
"//mojo/public/cpp/platform",
]
}

source_set("unit_tests") {
testonly = true

sources = [ "mojo_ipc_server_unittest.cc" ]
deps = [
":mojo_ipc",
":test_support",
"//base",
"//base/test:test_support",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/platform",
"//mojo/public/cpp/system",
"//remoting/host/mojom",
"//testing/gmock",
"//testing/gtest",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/fake_ipc_server.h"
#include "remoting/host/mojo_ipc/fake_ipc_server.h"

namespace remoting {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef REMOTING_HOST_FAKE_IPC_SERVER_H_
#define REMOTING_HOST_FAKE_IPC_SERVER_H_
#ifndef REMOTING_HOST_MOJO_IPC_FAKE_IPC_SERVER_H_
#define REMOTING_HOST_MOJO_IPC_FAKE_IPC_SERVER_H_

#include "remoting/host/ipc_server.h"
#include "remoting/host/mojo_ipc/ipc_server.h"

namespace remoting {

Expand Down Expand Up @@ -39,4 +39,4 @@ class FakeIpcServer final : public IpcServer {

} // namespace remoting

#endif // REMOTING_HOST_FAKE_IPC_SERVER_H_
#endif // REMOTING_HOST_MOJO_IPC_FAKE_IPC_SERVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef REMOTING_HOST_IPC_SERVER_H_
#define REMOTING_HOST_IPC_SERVER_H_
#ifndef REMOTING_HOST_MOJO_IPC_IPC_SERVER_H_
#define REMOTING_HOST_MOJO_IPC_IPC_SERVER_H_

#include "base/callback.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
Expand Down Expand Up @@ -39,4 +39,4 @@ class IpcServer {

} // namespace remoting

#endif // REMOTING_HOST_IPC_SERVER_H_
#endif // REMOTING_HOST_MOJO_IPC_IPC_SERVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/mojo_ipc_server.h"
#include "remoting/host/mojo_ipc/mojo_ipc_server.h"

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef REMOTING_HOST_MOJO_IPC_SERVER_H_
#define REMOTING_HOST_MOJO_IPC_SERVER_H_
#ifndef REMOTING_HOST_MOJO_IPC_MOJO_IPC_SERVER_H_
#define REMOTING_HOST_MOJO_IPC_MOJO_IPC_SERVER_H_

#include <memory>

Expand All @@ -18,7 +18,7 @@
#include "mojo/public/cpp/platform/named_platform_channel.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/public/cpp/system/simple_watcher.h"
#include "remoting/host/ipc_server.h"
#include "remoting/host/mojo_ipc/ipc_server.h"

namespace mojo {
class IsolatedConnection;
Expand Down Expand Up @@ -162,4 +162,4 @@ class MojoIpcServer final : public MojoIpcServerBase {

} // namespace remoting

#endif // REMOTING_HOST_MOJO_IPC_SERVER_H_
#endif // REMOTING_HOST_MOJO_IPC_MOJO_IPC_SERVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/mojo_ipc_server.h"
#include "remoting/host/mojo_ipc/mojo_ipc_server.h"

#include <memory>
#include <string>
Expand All @@ -25,7 +25,7 @@
#include "mojo/public/cpp/platform/platform_channel_endpoint.h"
#include "mojo/public/cpp/system/isolated_connection.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "remoting/host/mojo_ipc_test_util.h"
#include "remoting/host/mojo_ipc/mojo_ipc_test_util.h"
#include "remoting/host/mojom/testing.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/mojo_ipc_test_util.h"
#include "remoting/host/mojo_ipc/mojo_ipc_test_util.h"

#include <inttypes.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef REMOTING_HOST_MOJO_IPC_TEST_UTIL_H_
#define REMOTING_HOST_MOJO_IPC_TEST_UTIL_H_
#ifndef REMOTING_HOST_MOJO_IPC_MOJO_IPC_TEST_UTIL_H_
#define REMOTING_HOST_MOJO_IPC_MOJO_IPC_TEST_UTIL_H_

#include "mojo/public/cpp/platform/named_platform_channel.h"

Expand All @@ -16,4 +16,4 @@ mojo::NamedPlatformChannel::ServerName GenerateRandomServerName();
} // namespace test
} // namespace remoting

#endif // REMOTING_HOST_MOJO_IPC_TEST_UTIL_H_
#endif // REMOTING_HOST_MOJO_IPC_MOJO_IPC_TEST_UTIL_H_
4 changes: 2 additions & 2 deletions remoting/host/remote_open_url_client_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "mojo/public/cpp/platform/named_platform_channel.h"
#include "remoting/host/mojo_ipc_server.h"
#include "remoting/host/mojo_ipc_test_util.h"
#include "remoting/host/mojo_ipc/mojo_ipc_server.h"
#include "remoting/host/mojo_ipc/mojo_ipc_test_util.h"
#include "remoting/host/mojom/remote_url_opener.mojom-shared.h"
#include "remoting/host/mojom/remote_url_opener.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
Expand Down
2 changes: 1 addition & 1 deletion remoting/host/remote_open_url_message_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/host/mojo_ipc_server.h"
#include "remoting/host/mojo_ipc/mojo_ipc_server.h"
#include "remoting/host/remote_open_url_constants.h"
#include "remoting/protocol/message_serialization.h"
#include "url/gurl.h"
Expand Down
2 changes: 1 addition & 1 deletion remoting/host/remote_open_url_message_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "net/base/io_buffer.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/host/fake_ipc_server.h"
#include "remoting/host/mojo_ipc/fake_ipc_server.h"
#include "remoting/host/mojom/remote_url_opener.mojom.h"
#include "remoting/proto/remote_open_url.pb.h"
#include "remoting/protocol/fake_message_pipe.h"
Expand Down

0 comments on commit e145289

Please sign in to comment.