summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorsky <sky@chromium.org>2015-08-05 14:29:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-05 21:30:16 +0000
commita11b4d76a27816fe025af647825becac5f633c34 (patch)
tree0be98a2476a87d90c23e172660d4e2d14f1dd1fd /mojo
parent3e4aaaa45c528d4ab0670331a6c0ebfc4f3ab8e6 (diff)
downloadchromium_src-a11b4d76a27816fe025af647825becac5f633c34.zip
chromium_src-a11b4d76a27816fe025af647825becac5f633c34.tar.gz
chromium_src-a11b4d76a27816fe025af647825becac5f633c34.tar.bz2
Straightens outs DEPS in mojo/common
Prior to this change //mojo/environment depended upon //mojo/common. //mojo/common's deps are wrong and it needs to be depend upon various things in //third_party/mojo/src/mojo... When these DEPS are added link errors result because Environment and and a couple of other things need to be defined. These are defined in //mojo/environment. But //mojo/environment can't be a dep of //mojo/common, else we get a cycle. To straighten this out I've moved the files //mojo/environment needs from //mojo/common to //mojo/message_pump. //mojo/environment no longer depends upon //mojo/common, only //mojo/message_pump. //mojo/common can then depend upon //mojo/environment and we no longer have the cycle. Yay! BUG=none TEST=none Review URL: https://codereview.chromium.org/1262173005 Cr-Commit-Position: refs/heads/master@{#341979}
Diffstat (limited to 'mojo')
-rw-r--r--mojo/android/javatests/mojo_test_case.cc3
-rw-r--r--mojo/android/system/base_run_loop.cc2
-rw-r--r--mojo/application/public/cpp/BUILD.gn5
-rw-r--r--mojo/application/public/cpp/lib/application_runner.cc2
-rw-r--r--mojo/application/public/cpp/lib/content_handler_factory.cc2
-rw-r--r--mojo/common/BUILD.gn18
-rw-r--r--mojo/environment/BUILD.gn3
-rw-r--r--mojo/environment/default_async_waiter_impl.cc2
-rw-r--r--mojo/message_pump/BUILD.gn23
-rw-r--r--mojo/message_pump/handle_watcher.cc (renamed from mojo/common/handle_watcher.cc)8
-rw-r--r--mojo/message_pump/handle_watcher.h (renamed from mojo/common/handle_watcher.h)9
-rw-r--r--mojo/message_pump/handle_watcher_unittest.cc (renamed from mojo/common/handle_watcher_unittest.cc)6
-rw-r--r--mojo/message_pump/message_pump_mojo.cc (renamed from mojo/common/message_pump_mojo.cc)6
-rw-r--r--mojo/message_pump/message_pump_mojo.h (renamed from mojo/common/message_pump_mojo.h)9
-rw-r--r--mojo/message_pump/message_pump_mojo_handler.h (renamed from mojo/common/message_pump_mojo_handler.h)9
-rw-r--r--mojo/message_pump/message_pump_mojo_unittest.cc (renamed from mojo/common/message_pump_mojo_unittest.cc)4
-rw-r--r--mojo/message_pump/time_helper.cc (renamed from mojo/common/time_helper.cc)2
-rw-r--r--mojo/message_pump/time_helper.h (renamed from mojo/common/time_helper.h)11
-rw-r--r--mojo/mojo_base.gyp46
-rw-r--r--mojo/runner/BUILD.gn9
-rw-r--r--mojo/runner/android/main.cc2
-rw-r--r--mojo/runner/child_process.cc2
-rw-r--r--mojo/runner/child_process_host_unittest.cc2
-rw-r--r--mojo/services/network/BUILD.gn2
-rw-r--r--mojo/services/network/DEPS1
-rw-r--r--mojo/services/network/http_connection_impl.cc2
-rw-r--r--mojo/services/network/network_service_delegate.cc2
-rw-r--r--mojo/services/network/public/DEPS2
-rw-r--r--mojo/services/network/public/cpp/BUILD.gn2
-rw-r--r--mojo/services/network/public/cpp/web_socket_read_queue.h2
-rw-r--r--mojo/services/network/public/cpp/web_socket_write_queue.h2
-rw-r--r--mojo/services/network/tcp_connected_socket_impl.h2
-rw-r--r--mojo/services/network/url_loader_impl.h2
-rw-r--r--mojo/services/network/url_loader_impl_apptest.cc2
-rw-r--r--mojo/services/network/web_socket_impl.cc2
35 files changed, 124 insertions, 84 deletions
diff --git a/mojo/android/javatests/mojo_test_case.cc b/mojo/android/javatests/mojo_test_case.cc
index 419d14d..3408227 100644
--- a/mojo/android/javatests/mojo_test_case.cc
+++ b/mojo/android/javatests/mojo_test_case.cc
@@ -13,8 +13,7 @@
#include "base/run_loop.h"
#include "base/test/test_support_android.h"
#include "jni/MojoTestCase_jni.h"
-#include "mojo/common/message_pump_mojo.h"
-
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/environment/environment.h"
namespace {
diff --git a/mojo/android/system/base_run_loop.cc b/mojo/android/system/base_run_loop.cc
index df33f01..2bc2fb4 100644
--- a/mojo/android/system/base_run_loop.cc
+++ b/mojo/android/system/base_run_loop.cc
@@ -12,7 +12,7 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "jni/BaseRunLoop_jni.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
namespace mojo {
namespace android {
diff --git a/mojo/application/public/cpp/BUILD.gn b/mojo/application/public/cpp/BUILD.gn
index 6351691..0181322 100644
--- a/mojo/application/public/cpp/BUILD.gn
+++ b/mojo/application/public/cpp/BUILD.gn
@@ -48,6 +48,7 @@ source_set("sources") {
"//mojo/application/public/interfaces",
"//mojo/common",
"//mojo/environment:chromium",
+ "//mojo/message_pump",
"//third_party/mojo/src/mojo/public/cpp/bindings",
"//third_party/mojo/src/mojo/public/cpp/system",
]
@@ -70,9 +71,7 @@ source_set("content_handler") {
# TODO: this code should not depend on base.
"//base",
"//mojo/application/public/interfaces:interfaces_cpp_sources",
-
- # TODO: this code should not depend on mojo/common.
- "//mojo/common:common_base",
+ "//mojo/message_pump",
"//mojo/services/network/public/interfaces",
]
}
diff --git a/mojo/application/public/cpp/lib/application_runner.cc b/mojo/application/public/cpp/lib/application_runner.cc
index 0418d91..3127892 100644
--- a/mojo/application/public/cpp/lib/application_runner.cc
+++ b/mojo/application/public/cpp/lib/application_runner.cc
@@ -12,7 +12,7 @@
#include "base/threading/worker_pool.h"
#include "mojo/application/public/cpp/application_delegate.h"
#include "mojo/application/public/cpp/application_impl.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
namespace mojo {
diff --git a/mojo/application/public/cpp/lib/content_handler_factory.cc b/mojo/application/public/cpp/lib/content_handler_factory.cc
index a05c954..3ce666f 100644
--- a/mojo/application/public/cpp/lib/content_handler_factory.cc
+++ b/mojo/application/public/cpp/lib/content_handler_factory.cc
@@ -17,7 +17,7 @@
#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/application/public/cpp/application_runner.h"
#include "mojo/application/public/cpp/interface_factory_impl.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace mojo {
diff --git a/mojo/common/BUILD.gn b/mojo/common/BUILD.gn
index 99f0ba5..6dfed2f 100644
--- a/mojo/common/BUILD.gn
+++ b/mojo/common/BUILD.gn
@@ -21,13 +21,6 @@ component("common_base") {
"data_pipe_file_utils.cc",
"data_pipe_utils.cc",
"data_pipe_utils.h",
- "handle_watcher.cc",
- "handle_watcher.h",
- "message_pump_mojo.cc",
- "message_pump_mojo.h",
- "message_pump_mojo_handler.h",
- "time_helper.cc",
- "time_helper.h",
"user_agent.cc",
"user_agent.h",
"weak_binding_set.h",
@@ -39,7 +32,11 @@ component("common_base") {
deps = [
"//base",
"//base/third_party/dynamic_annotations",
+ "//mojo/environment:chromium",
"//third_party/mojo/src/mojo/public/c/system:for_component",
+ "//third_party/mojo/src/mojo/public/cpp/bindings",
+ "//third_party/mojo/src/mojo/public/cpp/environment",
+ "//third_party/mojo/src/mojo/public/cpp/system",
]
}
@@ -78,6 +75,7 @@ test("mojo_common_unittests") {
"//base:message_loop_tests",
"//base/test:test_support",
"//mojo/environment:chromium",
+ "//mojo/message_pump",
"//testing/gtest",
"//third_party/mojo/src/mojo/edk/test:run_all_unittests",
"//third_party/mojo/src/mojo/edk/test:test_support",
@@ -87,9 +85,11 @@ test("mojo_common_unittests") {
]
sources = [
+ # The message_pump tests are so small and some what related to this code
+ # that we put them here.
+ "../message_pump/handle_watcher_unittest.cc",
+ "../message_pump/message_pump_mojo_unittest.cc",
"common_type_converters_unittest.cc",
- "handle_watcher_unittest.cc",
- "message_pump_mojo_unittest.cc",
]
}
diff --git a/mojo/environment/BUILD.gn b/mojo/environment/BUILD.gn
index 9621dfb..d233c3b 100644
--- a/mojo/environment/BUILD.gn
+++ b/mojo/environment/BUILD.gn
@@ -55,7 +55,8 @@ component("chromium_impl") {
deps = [
"//base",
"//base/third_party/dynamic_annotations",
- "//mojo/common:common_base",
+ "//mojo/message_pump",
+ "//third_party/mojo/src/mojo/public/c/system:for_component",
"//third_party/mojo/src/mojo/public/cpp/environment:environment",
]
}
diff --git a/mojo/environment/default_async_waiter_impl.cc b/mojo/environment/default_async_waiter_impl.cc
index ff7a5247..5178edd 100644
--- a/mojo/environment/default_async_waiter_impl.cc
+++ b/mojo/environment/default_async_waiter_impl.cc
@@ -5,7 +5,7 @@
#include "mojo/environment/default_async_waiter_impl.h"
#include "base/bind.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
namespace mojo {
namespace internal {
diff --git a/mojo/message_pump/BUILD.gn b/mojo/message_pump/BUILD.gn
new file mode 100644
index 0000000..df027de
--- /dev/null
+++ b/mojo/message_pump/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright 2015 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.
+
+import("//testing/test.gni")
+
+source_set("message_pump") {
+ sources = [
+ "handle_watcher.cc",
+ "handle_watcher.h",
+ "message_pump_mojo.cc",
+ "message_pump_mojo.h",
+ "message_pump_mojo_handler.h",
+ "time_helper.cc",
+ "time_helper.h",
+ ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//third_party/mojo/src/mojo/public/cpp/system",
+ ]
+}
diff --git a/mojo/common/handle_watcher.cc b/mojo/message_pump/handle_watcher.cc
index 6bff0cd..d02c761 100644
--- a/mojo/common/handle_watcher.cc
+++ b/mojo/message_pump/handle_watcher.cc
@@ -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 "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include <map>
@@ -21,9 +21,9 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
-#include "mojo/common/message_pump_mojo.h"
-#include "mojo/common/message_pump_mojo_handler.h"
-#include "mojo/common/time_helper.h"
+#include "mojo/message_pump/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo_handler.h"
+#include "mojo/message_pump/time_helper.h"
namespace mojo {
namespace common {
diff --git a/mojo/common/handle_watcher.h b/mojo/message_pump/handle_watcher.h
index 9056ec4..33e4cfcb 100644
--- a/mojo/common/handle_watcher.h
+++ b/mojo/message_pump/handle_watcher.h
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_HANDLE_WATCHER_H_
-#define MOJO_COMMON_HANDLE_WATCHER_H_
+#ifndef MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
+#define MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
-#include "mojo/common/mojo_common_export.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace base {
@@ -24,7 +23,7 @@ class HandleWatcherTest;
// HandleWatcher is used to asynchronously wait on a handle and notify a Closure
// when the handle is ready, or the deadline has expired.
-class MOJO_COMMON_EXPORT HandleWatcher {
+class HandleWatcher {
public:
HandleWatcher();
@@ -61,4 +60,4 @@ class MOJO_COMMON_EXPORT HandleWatcher {
} // namespace common
} // namespace mojo
-#endif // MOJO_COMMON_HANDLE_WATCHER_H_
+#endif // MOJO_MESSAGE_PUMP_HANDLE_WATCHER_H_
diff --git a/mojo/common/handle_watcher_unittest.cc b/mojo/message_pump/handle_watcher_unittest.cc
index 41d5ffb..bfbfa9f 100644
--- a/mojo/common/handle_watcher_unittest.cc
+++ b/mojo/message_pump/handle_watcher_unittest.cc
@@ -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 "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include <string>
@@ -13,8 +13,8 @@
#include "base/run_loop.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/threading/thread.h"
-#include "mojo/common/message_pump_mojo.h"
-#include "mojo/common/time_helper.h"
+#include "mojo/message_pump/message_pump_mojo.h"
+#include "mojo/message_pump/time_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
#include "third_party/mojo/src/mojo/public/cpp/test_support/test_utils.h"
diff --git a/mojo/common/message_pump_mojo.cc b/mojo/message_pump/message_pump_mojo.cc
index afbf8f9..a24349b 100644
--- a/mojo/common/message_pump_mojo.cc
+++ b/mojo/message_pump/message_pump_mojo.cc
@@ -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 "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include <algorithm>
#include <vector>
@@ -12,8 +12,8 @@
#include "base/logging.h"
#include "base/threading/thread_local.h"
#include "base/time/time.h"
-#include "mojo/common/message_pump_mojo_handler.h"
-#include "mojo/common/time_helper.h"
+#include "mojo/message_pump/message_pump_mojo_handler.h"
+#include "mojo/message_pump/time_helper.h"
namespace mojo {
namespace common {
diff --git a/mojo/common/message_pump_mojo.h b/mojo/message_pump/message_pump_mojo.h
index 86dd8ac..f61bea2 100644
--- a/mojo/common/message_pump_mojo.h
+++ b/mojo/message_pump/message_pump_mojo.h
@@ -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 MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
-#define MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
+#ifndef MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
+#define MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
#include <map>
@@ -13,7 +13,6 @@
#include "base/observer_list.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
-#include "mojo/common/mojo_common_export.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace mojo {
@@ -22,7 +21,7 @@ namespace common {
class MessagePumpMojoHandler;
// Mojo implementation of MessagePump.
-class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
+class MessagePumpMojo : public base::MessagePump {
public:
class Observer {
public:
@@ -133,4 +132,4 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
} // namespace common
} // namespace mojo
-#endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
+#endif // MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
diff --git a/mojo/common/message_pump_mojo_handler.h b/mojo/message_pump/message_pump_mojo_handler.h
index dd136ed..24f1f44 100644
--- a/mojo/common/message_pump_mojo_handler.h
+++ b/mojo/message_pump/message_pump_mojo_handler.h
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_
-#define MOJO_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_
+#ifndef MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_HANDLER_H_
+#define MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_HANDLER_H_
-#include "mojo/common/mojo_common_export.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace mojo {
@@ -13,7 +12,7 @@ namespace common {
// Used by MessagePumpMojo to notify when a handle is either ready or has become
// invalid. In case of error, the handler will be removed.
-class MOJO_COMMON_EXPORT MessagePumpMojoHandler {
+class MessagePumpMojoHandler {
public:
virtual void OnHandleReady(const Handle& handle) = 0;
@@ -26,4 +25,4 @@ class MOJO_COMMON_EXPORT MessagePumpMojoHandler {
} // namespace common
} // namespace mojo
-#endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_HANDLER_H_
+#endif // MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_HANDLER_H_
diff --git a/mojo/common/message_pump_mojo_unittest.cc b/mojo/message_pump/message_pump_mojo_unittest.cc
index 5d695f6..51f3670 100644
--- a/mojo/common/message_pump_mojo_unittest.cc
+++ b/mojo/message_pump/message_pump_mojo_unittest.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "base/message_loop/message_loop_test.h"
#include "base/run_loop.h"
-#include "mojo/common/message_pump_mojo_handler.h"
+#include "mojo/message_pump/message_pump_mojo_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
diff --git a/mojo/common/time_helper.cc b/mojo/message_pump/time_helper.cc
index 36fd087..ffd667e 100644
--- a/mojo/common/time_helper.cc
+++ b/mojo/message_pump/time_helper.cc
@@ -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 "mojo/common/time_helper.h"
+#include "mojo/message_pump/time_helper.h"
#include "base/time/tick_clock.h"
diff --git a/mojo/common/time_helper.h b/mojo/message_pump/time_helper.h
index 365ae04..dfdc7bb 100644
--- a/mojo/common/time_helper.h
+++ b/mojo/message_pump/time_helper.h
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_TIME_HELPER_H_
-#define MOJO_COMMON_TIME_HELPER_H_
+#ifndef MOJO_MESSAGE_PUMP_TIME_HELPER_H_
+#define MOJO_MESSAGE_PUMP_TIME_HELPER_H_
#include "base/time/time.h"
-#include "mojo/common/mojo_common_export.h"
namespace base {
class TickClock;
@@ -18,17 +17,17 @@ namespace test {
// Sets the TickClock used for getting TimeTicks::Now(). This is currently used
// by both HandleWatcher and MessagePumpMojo.
-MOJO_COMMON_EXPORT void SetTickClockForTest(base::TickClock* clock);
+void SetTickClockForTest(base::TickClock* clock);
} // namespace test
namespace internal {
// Returns now. Used internally; generally not useful.
-MOJO_COMMON_EXPORT base::TimeTicks NowTicks();
+base::TimeTicks NowTicks();
} // namespace internal
} // namespace common
} // namespace mojo
-#endif // MOJO_COMMON_TIME_HELPER_H_
+#endif // MOJO_MESSAGE_PUMP_TIME_HELPER_H_
diff --git a/mojo/mojo_base.gyp b/mojo/mojo_base.gyp
index 550c41d..6047c53 100644
--- a/mojo/mojo_base.gyp
+++ b/mojo/mojo_base.gyp
@@ -36,6 +36,28 @@
'type': 'none',
},
{
+ # GN version: //mojo/message_pump
+ 'target_name': 'mojo_message_pump_lib',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '<(mojo_system_for_component)',
+ ],
+ 'export_dependent_settings': [
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ ],
+ 'sources': [
+ 'message_pump/handle_watcher.cc',
+ 'message_pump/handle_watcher.h',
+ 'message_pump/message_pump_mojo.cc',
+ 'message_pump/message_pump_mojo.h',
+ 'message_pump/message_pump_mojo_handler.h',
+ 'message_pump/time_helper.cc',
+ 'message_pump/time_helper.h',
+ ],
+ },
+ {
# GN version: //mojo/common
'target_name': 'mojo_common_lib',
'type': '<(component)',
@@ -56,13 +78,6 @@
'common/data_pipe_file_utils.cc',
'common/data_pipe_utils.cc',
'common/data_pipe_utils.h',
- 'common/handle_watcher.cc',
- 'common/handle_watcher.h',
- 'common/message_pump_mojo.cc',
- 'common/message_pump_mojo.h',
- 'common/message_pump_mojo_handler.h',
- 'common/time_helper.cc',
- 'common/time_helper.h',
],
},
{
@@ -112,19 +127,20 @@
'../base/base.gyp:base_message_loop_tests',
'../testing/gtest.gyp:gtest',
'../url/url.gyp:url_lib',
- 'mojo_common_lib',
- 'mojo_url_type_converters',
'../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
'../third_party/mojo/mojo_edk.gyp:mojo_common_test_support',
'../third_party/mojo/mojo_edk.gyp:mojo_run_all_unittests',
- 'mojo_environment_chromium',
'../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
'../third_party/mojo/mojo_public.gyp:mojo_public_test_utils',
+ 'mojo_common_lib',
+ 'mojo_environment_chromium',
+ 'mojo_message_pump_lib',
+ 'mojo_url_type_converters',
],
'sources': [
'common/common_type_converters_unittest.cc',
- 'common/handle_watcher_unittest.cc',
- 'common/message_pump_mojo_unittest.cc',
+ 'message_pump/handle_watcher_unittest.cc',
+ 'message_pump/message_pump_mojo_unittest.cc',
],
},
{
@@ -136,7 +152,6 @@
'../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
],
'sources': [
- 'environment/environment.cc',
# TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
"../third_party/mojo/src/mojo/public/cpp/environment/async_waiter.h",
"../third_party/mojo/src/mojo/public/cpp/environment/lib/async_waiter.cc",
@@ -145,6 +160,7 @@
"../third_party/mojo/src/mojo/public/cpp/environment/lib/scoped_task_tracking.cc",
"../third_party/mojo/src/mojo/public/cpp/environment/logging.h",
"../third_party/mojo/src/mojo/public/cpp/environment/task_tracker.h",
+ 'environment/environment.cc',
],
'include_dirs': [
'..',
@@ -169,7 +185,7 @@
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- 'mojo_common_lib',
+ 'mojo_message_pump_lib',
'<(mojo_system_for_component)',
],
'sources': [
@@ -240,7 +256,7 @@
],
'dependencies': [
'mojo_application_bindings',
- 'mojo_common_lib',
+ 'mojo_message_pump_lib',
],
},
{
diff --git a/mojo/runner/BUILD.gn b/mojo/runner/BUILD.gn
index 1744441..89cf5ec 100644
--- a/mojo/runner/BUILD.gn
+++ b/mojo/runner/BUILD.gn
@@ -33,6 +33,7 @@ source_set("mojo_runner_lib") {
"//build/config/sanitizers:deps",
"//mojo/common",
"//mojo/environment:chromium",
+ "//mojo/message_pump",
]
if (!is_android) {
@@ -127,11 +128,12 @@ source_set("lib") {
"//components/devtools_service/public/interfaces",
"//mojo/application/public/cpp",
"//mojo/common:tracing_impl",
- "//mojo/util:filename_util",
- "//third_party/mojo/src/mojo/edk/system",
+ "//mojo/message_pump",
"//mojo/services/network/public/interfaces",
- "//mojo/shell",
"//mojo/services/tracing:bindings",
+ "//mojo/shell",
+ "//mojo/util:filename_util",
+ "//third_party/mojo/src/mojo/edk/system",
"//ui/gl",
"//url",
]
@@ -439,6 +441,7 @@ test("mojo_runner_unittests") {
"//mojo/application/public/cpp",
"//mojo/common",
"//mojo/environment:chromium",
+ "//mojo/message_pump",
"//mojo/services/test_service:bindings",
"//mojo/shell",
"//mojo/util:filename_util",
diff --git a/mojo/runner/android/main.cc b/mojo/runner/android/main.cc
index c395dfa..fcd3749 100644
--- a/mojo/runner/android/main.cc
+++ b/mojo/runner/android/main.cc
@@ -20,7 +20,7 @@
#include "base/run_loop.h"
#include "components/view_manager/android_loader.h"
#include "jni/ShellMain_jni.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/runner/android/android_handler_loader.h"
#include "mojo/runner/android/background_application_loader.h"
#include "mojo/runner/android/context_init.h"
diff --git a/mojo/runner/child_process.cc b/mojo/runner/child_process.cc
index 9966934..eda7829 100644
--- a/mojo/runner/child_process.cc
+++ b/mojo/runner/child_process.cc
@@ -20,12 +20,12 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
-#include "mojo/common/message_pump_mojo.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/platform_channel_pair.h"
#include "mojo/edk/embedder/process_delegate.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
#include "mojo/edk/embedder/simple_platform_support.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/cpp/system/core.h"
#include "mojo/runner/child_process.mojom.h"
#include "mojo/runner/native_application_support.h"
diff --git a/mojo/runner/child_process_host_unittest.cc b/mojo/runner/child_process_host_unittest.cc
index 0443c46..b4482b7 100644
--- a/mojo/runner/child_process_host_unittest.cc
+++ b/mojo/runner/child_process_host_unittest.cc
@@ -9,7 +9,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/runner/context.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn
index 0b9e804..e01a567 100644
--- a/mojo/services/network/BUILD.gn
+++ b/mojo/services/network/BUILD.gn
@@ -93,6 +93,7 @@ source_set("lib") {
"//mojo/application/public/cpp",
"//mojo/common:common_base",
"//mojo/common:url_type_converters",
+ "//mojo/message_pump",
"//mojo/services/network/public/cpp",
"//mojo/services/network/public/interfaces",
"//net",
@@ -139,6 +140,7 @@ mojo_native_application("apptests") {
"//mojo/application/public/cpp:sources",
"//mojo/application/public/cpp:test_support",
"//mojo/common:common_base",
+ "//mojo/message_pump",
"//mojo/services/network/public/cpp",
"//mojo/services/network/public/interfaces",
"//net",
diff --git a/mojo/services/network/DEPS b/mojo/services/network/DEPS
index 64f12dc..fa4edaa 100644
--- a/mojo/services/network/DEPS
+++ b/mojo/services/network/DEPS
@@ -3,6 +3,7 @@ include_rules = [
"+components/filesystem/public/interfaces",
"+mojo/application",
"+mojo/common",
+ "+mojo/message_pump",
"+mojo/services",
"+mojo/util",
"+net",
diff --git a/mojo/services/network/http_connection_impl.cc b/mojo/services/network/http_connection_impl.cc
index 552ddee..965c27e 100644
--- a/mojo/services/network/http_connection_impl.cc
+++ b/mojo/services/network/http_connection_impl.cc
@@ -12,7 +12,7 @@
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "mojo/services/network/http_server_impl.h"
#include "mojo/services/network/net_adapters.h"
#include "mojo/services/network/public/cpp/web_socket_read_queue.h"
diff --git a/mojo/services/network/network_service_delegate.cc b/mojo/services/network/network_service_delegate.cc
index 55ab0c3..71d40ea 100644
--- a/mojo/services/network/network_service_delegate.cc
+++ b/mojo/services/network/network_service_delegate.cc
@@ -12,7 +12,7 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "mojo/application/public/cpp/application_connection.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/services/network/network_service_delegate_observer.h"
#include "mojo/services/network/network_service_impl.h"
#include "mojo/services/network/url_loader_factory_impl.h"
diff --git a/mojo/services/network/public/DEPS b/mojo/services/network/public/DEPS
index 86a3623..3a9fdf7 100644
--- a/mojo/services/network/public/DEPS
+++ b/mojo/services/network/public/DEPS
@@ -4,7 +4,7 @@ include_rules = [
"-net",
"-services",
"-testing",
- "!mojo/common",
+ "!mojo/message_pump",
"+mojo/services/network/public",
"+third_party/mojo/src/mojo/public",
]
diff --git a/mojo/services/network/public/cpp/BUILD.gn b/mojo/services/network/public/cpp/BUILD.gn
index 52af16b..030636c 100644
--- a/mojo/services/network/public/cpp/BUILD.gn
+++ b/mojo/services/network/public/cpp/BUILD.gn
@@ -20,8 +20,8 @@ mojo_sdk_source_set("cpp") {
"../interfaces",
"//base",
"//mojo/application/public/cpp",
- "//mojo/common",
"//mojo/environment:chromium",
+ "//mojo/message_pump",
]
mojo_sdk_deps = [
diff --git a/mojo/services/network/public/cpp/web_socket_read_queue.h b/mojo/services/network/public/cpp/web_socket_read_queue.h
index 287e91c..5ba5fa5 100644
--- a/mojo/services/network/public/cpp/web_socket_read_queue.h
+++ b/mojo/services/network/public/cpp/web_socket_read_queue.h
@@ -8,7 +8,7 @@
#include "base/callback.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h"
namespace mojo {
diff --git a/mojo/services/network/public/cpp/web_socket_write_queue.h b/mojo/services/network/public/cpp/web_socket_write_queue.h
index 91e7924..d0ba6b2 100644
--- a/mojo/services/network/public/cpp/web_socket_write_queue.h
+++ b/mojo/services/network/public/cpp/web_socket_write_queue.h
@@ -8,7 +8,7 @@
#include "base/callback.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h"
namespace mojo {
diff --git a/mojo/services/network/tcp_connected_socket_impl.h b/mojo/services/network/tcp_connected_socket_impl.h
index 0327e47..b1c072e 100644
--- a/mojo/services/network/tcp_connected_socket_impl.h
+++ b/mojo/services/network/tcp_connected_socket_impl.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "mojo/application/public/cpp/app_lifetime_helper.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "mojo/services/network/public/interfaces/tcp_connected_socket.mojom.h"
#include "net/socket/tcp_socket.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
diff --git a/mojo/services/network/url_loader_impl.h b/mojo/services/network/url_loader_impl.h
index 656c615..88bf89c 100644
--- a/mojo/services/network/url_loader_impl.h
+++ b/mojo/services/network/url_loader_impl.h
@@ -8,7 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "mojo/application/public/cpp/app_lifetime_helper.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
diff --git a/mojo/services/network/url_loader_impl_apptest.cc b/mojo/services/network/url_loader_impl_apptest.cc
index bab6153..777889a 100644
--- a/mojo/services/network/url_loader_impl_apptest.cc
+++ b/mojo/services/network/url_loader_impl_apptest.cc
@@ -8,7 +8,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "mojo/application/public/cpp/application_test_base.h"
-#include "mojo/common/message_pump_mojo.h"
+#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/services/network/network_context.h"
#include "mojo/services/network/url_loader_impl.h"
#include "net/base/net_errors.h"
diff --git a/mojo/services/network/web_socket_impl.cc b/mojo/services/network/web_socket_impl.cc
index e6b89ba..fb64815 100644
--- a/mojo/services/network/web_socket_impl.cc
+++ b/mojo/services/network/web_socket_impl.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
-#include "mojo/common/handle_watcher.h"
+#include "mojo/message_pump/handle_watcher.h"
#include "mojo/services/network/network_context.h"
#include "mojo/services/network/public/cpp/web_socket_read_queue.h"
#include "mojo/services/network/public/cpp/web_socket_write_queue.h"