summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/components.gyp1
-rw-r--r--components/html_viewer/BUILD.gn3
-rw-r--r--components/html_viewer/DEPS1
-rw-r--r--components/html_viewer/blink_platform_impl.cc4
-rw-r--r--components/message_port.gypi25
-rw-r--r--components/message_port/BUILD.gn17
-rw-r--r--components/message_port/DEPS6
-rw-r--r--components/message_port/OWNERS2
-rw-r--r--components/message_port/web_message_port_channel_impl.cc (renamed from components/html_viewer/web_message_port_channel_impl.cc)6
-rw-r--r--components/message_port/web_message_port_channel_impl.h (renamed from components/html_viewer/web_message_port_channel_impl.h)10
-rw-r--r--third_party/mojo/mojo_public.gyp32
11 files changed, 92 insertions, 15 deletions
diff --git a/components/components.gyp b/components/components.gyp
index 4fef48a..fa2a106 100644
--- a/components/components.gyp
+++ b/components/components.gyp
@@ -93,6 +93,7 @@
'cdm.gypi',
'devtools_discovery.gypi',
'devtools_http_handler.gypi',
+ 'message_port.gypi',
'navigation_interception.gypi',
'power.gypi',
'safe_json_parser.gypi',
diff --git a/components/html_viewer/BUILD.gn b/components/html_viewer/BUILD.gn
index e03cb73..1ff16e64 100644
--- a/components/html_viewer/BUILD.gn
+++ b/components/html_viewer/BUILD.gn
@@ -89,8 +89,6 @@ source_set("lib") {
"web_cookie_jar_impl.h",
"web_layer_tree_view_impl.cc",
"web_layer_tree_view_impl.h",
- "web_message_port_channel_impl.cc",
- "web_message_port_channel_impl.h",
"web_mime_registry_impl.cc",
"web_mime_registry_impl.h",
"web_notification_manager_impl.cc",
@@ -116,6 +114,7 @@ source_set("lib") {
"//components/clipboard/public/interfaces",
"//components/devtools_service/public/cpp",
"//components/devtools_service/public/interfaces",
+ "//components/message_port",
"//components/mime_util",
"//components/resource_provider/public/cpp",
"//components/resource_provider/public/interfaces",
diff --git a/components/html_viewer/DEPS b/components/html_viewer/DEPS
index 6e2d9a9..0a5b15a 100644
--- a/components/html_viewer/DEPS
+++ b/components/html_viewer/DEPS
@@ -6,6 +6,7 @@ include_rules = [
"+components/clipboard",
"+components/devtools_service/public",
"+components/gpu",
+ "+components/message_port",
"+components/mime_util",
"+components/resource_provider/public",
"+components/scheduler",
diff --git a/components/html_viewer/blink_platform_impl.cc b/components/html_viewer/blink_platform_impl.cc
index 7c37000..e054948 100644
--- a/components/html_viewer/blink_platform_impl.cc
+++ b/components/html_viewer/blink_platform_impl.cc
@@ -16,9 +16,9 @@
#include "components/html_viewer/blink_resource_constants.h"
#include "components/html_viewer/web_clipboard_impl.h"
#include "components/html_viewer/web_cookie_jar_impl.h"
-#include "components/html_viewer/web_message_port_channel_impl.h"
#include "components/html_viewer/web_socket_handle_impl.h"
#include "components/html_viewer/web_url_loader_impl.h"
+#include "components/message_port/web_message_port_channel_impl.h"
#include "components/mime_util/mime_util.h"
#include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
#include "components/scheduler/renderer/renderer_scheduler.h"
@@ -179,7 +179,7 @@ blink::WebCompositorSupport* BlinkPlatformImpl::compositorSupport() {
void BlinkPlatformImpl::createMessageChannel(
blink::WebMessagePortChannel** channel1,
blink::WebMessagePortChannel** channel2) {
- WebMessagePortChannelImpl::CreatePair(channel1, channel2);
+ message_port::WebMessagePortChannelImpl::CreatePair(channel1, channel2);
}
blink::WebScrollbarBehavior* BlinkPlatformImpl::scrollbarBehavior() {
diff --git a/components/message_port.gypi b/components/message_port.gypi
new file mode 100644
index 0000000..498405e
--- /dev/null
+++ b/components/message_port.gypi
@@ -0,0 +1,25 @@
+# Copyright 2013 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'message_port',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../mojo/mojo_base.gyp:mojo_common_lib',
+ '../third_party/WebKit/public/blink.gyp:blink',
+ '../third_party/mojo/mojo_public.gyp:mojo_system_cpp_headers',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'message_port/web_message_port_channel_impl.cc',
+ 'message_port/web_message_port_channel_impl.h',
+ ],
+ },
+ ],
+}
diff --git a/components/message_port/BUILD.gn b/components/message_port/BUILD.gn
new file mode 100644
index 0000000..3a81750
--- /dev/null
+++ b/components/message_port/BUILD.gn
@@ -0,0 +1,17 @@
+# 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.
+
+source_set("message_port") {
+ sources = [
+ "web_message_port_channel_impl.cc",
+ "web_message_port_channel_impl.h",
+ ]
+
+ public_deps = [
+ "//base",
+ "//mojo/common",
+ "//third_party/WebKit/public:blink",
+ "//third_party/mojo/src/mojo/public/cpp/system",
+ ]
+}
diff --git a/components/message_port/DEPS b/components/message_port/DEPS
new file mode 100644
index 0000000..eba876f
--- /dev/null
+++ b/components/message_port/DEPS
@@ -0,0 +1,6 @@
+include_rules = [
+ "+base",
+ "+mojo/common",
+ "+third_party/WebKit/public",
+ "+third_party/mojo/src/mojo/public/cpp/system",
+]
diff --git a/components/message_port/OWNERS b/components/message_port/OWNERS
new file mode 100644
index 0000000..80b8751
--- /dev/null
+++ b/components/message_port/OWNERS
@@ -0,0 +1,2 @@
+jam@chromium.org
+rockot@chromium.org
diff --git a/components/html_viewer/web_message_port_channel_impl.cc b/components/message_port/web_message_port_channel_impl.cc
index 45e75fc..93a6212 100644
--- a/components/html_viewer/web_message_port_channel_impl.cc
+++ b/components/message_port/web_message_port_channel_impl.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 "components/html_viewer/web_message_port_channel_impl.h"
+#include "components/message_port/web_message_port_channel_impl.h"
#include "base/bind.h"
#include "base/logging.h"
@@ -16,7 +16,7 @@ using blink::WebMessagePortChannelArray;
using blink::WebMessagePortChannelClient;
using blink::WebString;
-namespace html_viewer {
+namespace message_port {
void WebMessagePortChannelImpl::CreatePair(
blink::WebMessagePortChannel** channel1,
@@ -129,4 +129,4 @@ void WebMessagePortChannelImpl::OnMessageAvailable(MojoResult result) {
WaitForNextMessage();
}
-} // namespace html_viewer
+} // namespace message_port
diff --git a/components/html_viewer/web_message_port_channel_impl.h b/components/message_port/web_message_port_channel_impl.h
index 8c723bc..49fe97e 100644
--- a/components/html_viewer/web_message_port_channel_impl.h
+++ b/components/message_port/web_message_port_channel_impl.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
-#define COMPONENTS_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
+#ifndef COMPONENTS_MESSAGE_PORT_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
+#define COMPONENTS_MESSAGE_PORT_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
#include "base/basictypes.h"
#include "mojo/common/handle_watcher.h"
#include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
#include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h"
-namespace html_viewer {
+namespace message_port {
class WebMessagePortChannelImpl : public blink::WebMessagePortChannel {
public:
@@ -40,6 +40,6 @@ class WebMessagePortChannelImpl : public blink::WebMessagePortChannel {
DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
};
-} // namespace html_viewer
+} // namespace message_port
-#endif // COMPONENTS_HTML_VIEWER_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
+#endif // COMPONENTS_MESSAGE_PORT_WEB_MESSAGE_PORT_CHANNEL_IMPL_H_
diff --git a/third_party/mojo/mojo_public.gyp b/third_party/mojo/mojo_public.gyp
index 042289d..0a32d67 100644
--- a/third_party/mojo/mojo_public.gyp
+++ b/third_party/mojo/mojo_public.gyp
@@ -37,7 +37,6 @@
'type': 'none',
},
{
- # GN version: //mojo/public/c/system
'target_name': 'mojo_system',
'type': 'static_library',
'defines': [
@@ -55,6 +54,18 @@
],
},
'sources': [
+ 'src/mojo/public/platform/native/system_thunks.cc',
+ 'src/mojo/public/platform/native/system_thunks.h',
+ ],
+ 'dependencies': [
+ 'mojo_system_headers',
+ ],
+ },
+ {
+ # GN version: //mojo/public/c/system
+ 'target_name': 'mojo_system_headers',
+ 'type': 'none',
+ 'sources': [
'src/mojo/public/c/system/buffer.h',
'src/mojo/public/c/system/core.h',
'src/mojo/public/c/system/data_pipe.h',
@@ -63,8 +74,23 @@
'src/mojo/public/c/system/message_pipe.h',
'src/mojo/public/c/system/system_export.h',
'src/mojo/public/c/system/types.h',
- 'src/mojo/public/platform/native/system_thunks.cc',
- 'src/mojo/public/platform/native/system_thunks.h',
+ ],
+ },
+ {
+ # GN version: //mojo/public/cpp/system
+ 'target_name': 'mojo_system_cpp_headers',
+ 'type': 'none',
+ 'sources': [
+ 'src/mojo/public/cpp/system/buffer.h',
+ 'src/mojo/public/cpp/system/core.h',
+ 'src/mojo/public/cpp/system/data_pipe.h',
+ 'src/mojo/public/cpp/system/functions.h',
+ 'src/mojo/public/cpp/system/handle.h',
+ 'src/mojo/public/cpp/system/macros.h',
+ 'src/mojo/public/cpp/system/message_pipe.h',
+ ],
+ 'dependencies': [
+ 'mojo_system_headers',
],
},
{