Skip to content

Commit

Permalink
Move String16 mojom to mojo/public/cpp/base
Browse files Browse the repository at this point in the history
Also, for filenames related to String16, struct_traits => mojom_traits
and CommonCustomTypesStructTraits => String16MojomTraits

TBR=sky@chromium.org

Bug: 806965,799482
Change-Id: I4f725df6a90bc1d5ec75988bff281bf87832714b
Reviewed-on: https://chromium-review.googlesource.com/900060
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534282}
  • Loading branch information
krockot authored and chromium-wpt-export-bot committed Feb 3, 2018
1 parent 2a93e5f commit 7d9600c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion resources/chromium/device.mojom.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
mojo.internal.exposeNamespace('mojo.common.mojom');
if (mojo.config.autoLoadMojomDeps) {
mojo.internal.loadMojomIfNecessary(
'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js');
'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js');
}


Expand Down
2 changes: 1 addition & 1 deletion resources/chromium/device_manager.mojom.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
mojo.internal.exposeNamespace('mojo.common.mojom');
if (mojo.config.autoLoadMojomDeps) {
mojo.internal.loadMojomIfNecessary(
'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js');
'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js');
}


Expand Down
4 changes: 2 additions & 2 deletions resources/chromium/string16.mojom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) {

(function() {
var mojomId = 'mojo/common/string16.mojom';
var mojomId = 'mojo/public/mojom/base/string16.mojom';
if (mojo.internal.isMojomLoaded(mojomId)) {
console.warn('The following mojom is loaded multiple times: ' + mojomId);
return;
Expand Down Expand Up @@ -87,7 +87,7 @@ if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) {

if ((typeof mojo === 'undefined') || !mojo.internal || !mojo.config) {

define("mojo/common/string16.mojom", [
define("mojo/public/mojom/base/string16.mojom", [
"mojo/public/js/associated_bindings",
"mojo/public/js/bindings",
"mojo/public/js/codec",
Expand Down
4 changes: 2 additions & 2 deletions resources/chromium/webusb-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ let internal = {
};

// Converts an ECMAScript String object to an instance of
// mojo.common.mojom.String16.
// mojo_base.mojom.String16.
function mojoString16ToString(string16) {
return String.fromCharCode.apply(null, string16.data);
}

// Converts an instance of mojo.common.mojom.String16 to an ECMAScript String.
// Converts an instance of mojo_base.mojom.String16 to an ECMAScript String.
function stringToMojoString16(string) {
let array = new Array(string.length);
for (var i = 0; i < string.length; ++i) {
Expand Down

0 comments on commit 7d9600c

Please sign in to comment.