Commit b160cb7e authored by ortuno's avatar ortuno Committed by Commit bot

bluetooth: Introduce Web Bluetooth mojom interface

This is the first step to moving Web Bluetooth over to mojo. This patch
does the following:

- Creates a new WebBluetoothError mojo enum in a new web_bluetooth.mojom.
  This enum should be accessible from both content and blink.
- Modifies WebKit/public/BUILD.gn and WebKit/public/blink.gyp to
  generate the headers for the new mojom interface.
- Modifies WebKit/public/BUILD.gn, WebKit/Source/BUILD.gn,
  WebKit/public/blink_headers.gyp, and WebKit/Source/config.gyp to
  include files in gen/third_party/WebKit
- Modifies content/browser/DEPS so that the new headers can be accessed
  from content/browser.

Follow up patch with Web Bluetooth Service: http://crrev.com/1775953004

BUG=508771

Review URL: https://codereview.chromium.org/1784613002

Cr-Commit-Position: refs/heads/master@{#381525}
parent 4065174a
......@@ -99,6 +99,10 @@ include_rules = [
"+third_party/WebKit/public/web/WebTreeScopeType.h",
"+third_party/WebKit/public/web/mac/WebScrollbarTheme.h",
# Until we define where mojo interfaces should live in blink we whitelist each
# one separately.
"+third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
# DO NOT ADD ANY CHROME OR COMPONENTS INCLUDES HERE!!!
# See https://sites.google.com/a/chromium.org/dev/developers/content-module
# for more information.
......
......@@ -551,6 +551,7 @@ mojom("mojo_bindings") {
"//content/public/common:mojo_bindings",
"//mojo/shell/public/interfaces",
"//skia/public/interfaces",
"//third_party/WebKit/public:mojo_bindings",
"//ui/mojo/geometry:interfaces",
]
}
......@@ -42,13 +42,14 @@
'../mojo/mojo_base.gyp:mojo_application_bindings',
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
'../skia/skia.gyp:skia_mojo',
'../third_party/WebKit/public/blink.gyp:mojo_bindings',
'../ui/mojo/geometry/mojo_bindings.gyp:mojo_geometry_bindings',
'../url/url.gyp:url_interfaces_mojom',
],
'export_dependent_settings': [
'../url/url.gyp:url_interfaces_mojom',
],
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
},
{
'target_name': 'content_common_mojo_bindings',
......
......@@ -31,6 +31,7 @@ config("config") {
".",
"..",
"$root_gen_dir/blink",
"$root_gen_dir/third_party/WebKit",
]
cflags = []
......
......@@ -56,6 +56,7 @@
'include_dirs': [
'.',
'..',
'<(SHARED_INTERMEDIATE_DIR)/third_party/WebKit',
],
'msvs_disabled_warnings': [
4305, 4324, 4714, 4800, 4996,
......
......@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/WebKit/Source/config.gni")
import("//tools/grit/grit_rule.gni")
......@@ -83,7 +84,10 @@ group("all_blink") {
}
config("blink_headers_config") {
include_dirs = [ ".." ]
include_dirs = [
"..",
"$root_gen_dir/third_party/WebKit",
]
# Allow :blink_headers to include v8.h without linking to it.
configs = [ "//v8:external_config" ]
......@@ -169,3 +173,9 @@ grit("image_resources") {
"blink_image_resources_200_percent.pak",
]
}
mojom("mojo_bindings") {
sources = [
"platform/modules/bluetooth/web_bluetooth.mojom",
]
}
......@@ -37,6 +37,7 @@
'target_name': 'blink',
'type': 'none',
'dependencies': [
'mojo_bindings',
'../Source/platform/blink_platform.gyp:blink_platform',
'../Source/web/web.gyp:blink_web',
'<(DEPTH)/mojo/mojo_edk.gyp:mojo_system_impl',
......@@ -80,5 +81,25 @@
'../Source/web/web.gyp:blink_web_test_support',
],
},
{
'target_name': 'mojo_bindings_mojom',
'type': 'none',
'variables': {
'mojom_files': [
'platform/modules/bluetooth/web_bluetooth.mojom',
],
},
'includes': [
'../../../mojo/mojom_bindings_generator_explicit.gypi',
],
},
{
'target_name': 'mojo_bindings',
'type': 'static_library',
'dependencies': [
'mojo_bindings_mojom',
'../../../mojo/mojo_public.gyp:mojo_cpp_bindings',
],
},
],
}
......@@ -10,7 +10,10 @@
'target_name': 'blink_headers',
'type': 'none',
'direct_dependent_settings': {
'include_dirs': [ '..' ],
'include_dirs': [
'..',
'<(SHARED_INTERMEDIATE_DIR)/third_party/WebKit',
],
},
'includes': [ 'blink_headers.gypi' ],
'sources': ['<@(blink_public_sources)'],
......
// Copyright 2016 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.
module blink.mojom;
enum WebBluetoothError {
SUCCESS
};
// TODO(ortuno): Define Bluetooth Service.
// https://crbug.com/508771
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment