Commit ef1c07ae authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Add mojom and json5 as file types that should have LF line endings.

And fix up existing mojom files that had CRLF line endings.

Bug: 932129
Change-Id: I83585e5f43e72ebeac1bc44a05584a9b1632524e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600672
Auto-Submit: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657616}
parent 336e5e89
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
*.java text eol=lf *.java text eol=lf
*.js text eol=lf *.js text eol=lf
*.json text eol=lf *.json text eol=lf
*.json5 text eol=lf
*.md text eol=lf *.md text eol=lf
*.mm text eol=lf *.mm text eol=lf
*.mojom text eol=lf
*.sh text eol=lf *.sh text eol=lf
*.sql text eol=lf *.sql text eol=lf
*.txt text eol=lf *.txt text eol=lf
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
module content.mojom; module content.mojom;
import "services/network/public/mojom/url_loader.mojom"; import "services/network/public/mojom/url_loader.mojom";
import "url/mojom/url.mojom"; import "url/mojom/url.mojom";
// Used to transfer a URLLoader when after OnReceiveResponse() has been called // Used to transfer a URLLoader when after OnReceiveResponse() has been called
// on the URLLoaderClient. // on the URLLoaderClient.
struct TransferrableURLLoader { struct TransferrableURLLoader {
url.mojom.Url url; url.mojom.Url url;
network.mojom.URLLoader url_loader; network.mojom.URLLoader url_loader;
network.mojom.URLLoaderClient& url_loader_client; network.mojom.URLLoaderClient& url_loader_client;
network.mojom.URLResponseHead head; network.mojom.URLResponseHead head;
}; };
...@@ -7,12 +7,12 @@ module blink.mojom; ...@@ -7,12 +7,12 @@ module blink.mojom;
import "third_party/blink/public/mojom/native_file_system/native_file_system_file_handle.mojom"; import "third_party/blink/public/mojom/native_file_system/native_file_system_file_handle.mojom";
import "third_party/blink/public/mojom/native_file_system/native_file_system_error.mojom"; import "third_party/blink/public/mojom/native_file_system/native_file_system_error.mojom";
import "third_party/blink/public/mojom/native_file_system/native_file_system_transfer_token.mojom"; import "third_party/blink/public/mojom/native_file_system/native_file_system_transfer_token.mojom";
// Union representing either a file or a directory handle. Used in APIs that // Union representing either a file or a directory handle. Used in APIs that
// can return arbitrary handles. // can return arbitrary handles.
union NativeFileSystemHandle { union NativeFileSystemHandle {
NativeFileSystemFileHandle file; NativeFileSystemFileHandle file;
NativeFileSystemDirectoryHandle directory; NativeFileSystemDirectoryHandle directory;
}; };
struct NativeFileSystemEntry { struct NativeFileSystemEntry {
...@@ -29,48 +29,48 @@ struct NativeFileSystemEntry { ...@@ -29,48 +29,48 @@ struct NativeFileSystemEntry {
// layer (not the same type though because of https://crbug.com/956231 and the // layer (not the same type though because of https://crbug.com/956231 and the
// fact that our paths really aren't base::FilePath, but instead are virtual // fact that our paths really aren't base::FilePath, but instead are virtual
// paths). // paths).
interface NativeFileSystemDirectoryHandle { interface NativeFileSystemDirectoryHandle {
// Returns a file with the given |name| that is a child of this directory. If // Returns a file with the given |name| that is a child of this directory. If
// no such file exists, and |create| is true, the file is first created. // no such file exists, and |create| is true, the file is first created.
// Returns an error if the operation fails, or a handle to the newly created // Returns an error if the operation fails, or a handle to the newly created
// file if the operation succeeds. // file if the operation succeeds.
GetFile(string name, bool create) => GetFile(string name, bool create) =>
(NativeFileSystemError result, NativeFileSystemFileHandle? file); (NativeFileSystemError result, NativeFileSystemFileHandle? file);
// Returns a directory with the given |name| that is a child of this // Returns a directory with the given |name| that is a child of this
// directory. If no such directory exists, and |create| is true, the directory // directory. If no such directory exists, and |create| is true, the directory
// is first created. // is first created.
// Returns an error if the operation fails, or a handle to the newly created // Returns an error if the operation fails, or a handle to the newly created
// directory if the operation succeeds. // directory if the operation succeeds.
GetDirectory(string name, bool create) => GetDirectory(string name, bool create) =>
(NativeFileSystemError result, NativeFileSystemDirectoryHandle? directory); (NativeFileSystemError result, NativeFileSystemDirectoryHandle? directory);
// Returns all the direct children of this directory. // Returns all the direct children of this directory.
// TODO(mek): Change this API to stream results in chunks rather than block // TODO(mek): Change this API to stream results in chunks rather than block
// until all entries have been retrieved. // until all entries have been retrieved.
GetEntries() => (NativeFileSystemError result, array<NativeFileSystemEntry> entries); GetEntries() => (NativeFileSystemError result, array<NativeFileSystemEntry> entries);
// Creates a new file or directory, or overwrites an existing one in this // Creates a new file or directory, or overwrites an existing one in this
// directory by moving the file or directory represented by |source|. The // directory by moving the file or directory represented by |source|. The
// new file or directory will be named |name|. // new file or directory will be named |name|.
// Returns an error if the operation fails, or a handle to the newly created // Returns an error if the operation fails, or a handle to the newly created
// file or directory if the operation succeeds. // file or directory if the operation succeeds.
MoveFrom(NativeFileSystemTransferToken source, string name) => MoveFrom(NativeFileSystemTransferToken source, string name) =>
(NativeFileSystemError result, NativeFileSystemEntry? entry); (NativeFileSystemError result, NativeFileSystemEntry? entry);
// Creates a new file or directory, or overwrites an existing one in this // Creates a new file or directory, or overwrites an existing one in this
// directory by copying the file or directory represented by |source|. The // directory by copying the file or directory represented by |source|. The
// new file or directory will be named |name|. // new file or directory will be named |name|.
// Returns an error if the operation fails, or a handle to the newly created // Returns an error if the operation fails, or a handle to the newly created
// file or directory if the operation succeeds. // file or directory if the operation succeeds.
CopyFrom(NativeFileSystemTransferToken source, string name) => CopyFrom(NativeFileSystemTransferToken source, string name) =>
(NativeFileSystemError result, NativeFileSystemEntry? entry); (NativeFileSystemError result, NativeFileSystemEntry? entry);
// Deletes this directory. To delete recursively, set |recursive| to true. // Deletes this directory. To delete recursively, set |recursive| to true.
Remove(bool recurse) => (NativeFileSystemError result); Remove(bool recurse) => (NativeFileSystemError result);
// Create a TransferToken for this directory. This token can be used to pass // Create a TransferToken for this directory. This token can be used to pass
// a reference to this directory to other methods, for example to copy or move // a reference to this directory to other methods, for example to copy or move
// the directory, or when transferring the handle over postMessage. // the directory, or when transferring the handle over postMessage.
Transfer(NativeFileSystemTransferToken& token); Transfer(NativeFileSystemTransferToken& token);
}; };
...@@ -11,36 +11,36 @@ import "third_party/blink/public/mojom/native_file_system/native_file_system_tra ...@@ -11,36 +11,36 @@ import "third_party/blink/public/mojom/native_file_system/native_file_system_tra
// This interface represents a handle to a directory in the Native File System // This interface represents a handle to a directory in the Native File System
// API. // API.
interface NativeFileSystemFileHandle { interface NativeFileSystemFileHandle {
// Returns a blob representing the current state of this file. // Returns a blob representing the current state of this file.
AsBlob() => (NativeFileSystemError result, SerializedBlob? blob); AsBlob() => (NativeFileSystemError result, SerializedBlob? blob);
// Deletes this file. // Deletes this file.
Remove() => (NativeFileSystemError result); Remove() => (NativeFileSystemError result);
// Write data from |data| to the given |position| in the file being written // Write data from |data| to the given |position| in the file being written
// to. Returns whether the operation succeeded and if so how many bytes were // to. Returns whether the operation succeeded and if so how many bytes were
// written. // written.
// TODO(mek): This might need some way of reporting progress events back to // TODO(mek): This might need some way of reporting progress events back to
// the renderer. // the renderer.
Write(uint64 offset, Blob data) => (NativeFileSystemError result, Write(uint64 offset, Blob data) => (NativeFileSystemError result,
uint64 bytes_written); uint64 bytes_written);
// Write data from |stream| to the given |position| in the file being written // Write data from |stream| to the given |position| in the file being written
// to. Returns whether the operation succeeded and if so how many bytes were // to. Returns whether the operation succeeded and if so how many bytes were
// written. // written.
// TODO(mek): This might need some way of reporting progress events back to // TODO(mek): This might need some way of reporting progress events back to
// the renderer. // the renderer.
WriteStream(uint64 offset, handle<data_pipe_consumer> stream) => WriteStream(uint64 offset, handle<data_pipe_consumer> stream) =>
(NativeFileSystemError result, uint64 bytes_written); (NativeFileSystemError result, uint64 bytes_written);
// Changes the length of the file to be |length|. If |length| is larger than // Changes the length of the file to be |length|. If |length| is larger than
// the current size of the file, the file will be extended, and the extended // the current size of the file, the file will be extended, and the extended
// part is filled with null bytes. // part is filled with null bytes.
Truncate(uint64 length) => (NativeFileSystemError result); Truncate(uint64 length) => (NativeFileSystemError result);
// Create a TransferToken for this directory. This token can be used to pass // Create a TransferToken for this directory. This token can be used to pass
// a reference to this directory to other methods, for example to copy or move // a reference to this directory to other methods, for example to copy or move
// the file, or when transferring the handle over postMessage. // the file, or when transferring the handle over postMessage.
Transfer(NativeFileSystemTransferToken& token); Transfer(NativeFileSystemTransferToken& token);
}; };
...@@ -31,11 +31,11 @@ struct ChooseFileSystemEntryAcceptsOption { ...@@ -31,11 +31,11 @@ struct ChooseFileSystemEntryAcceptsOption {
// Native File System API. The renderer can request this interface for a // Native File System API. The renderer can request this interface for a
// specific worker or document, so the browser process will always be able to // specific worker or document, so the browser process will always be able to
// tell what operations are being done by which document or worker. // tell what operations are being done by which document or worker.
interface NativeFileSystemManager { interface NativeFileSystemManager {
// Opens the sandboxed filesystem for the origin of the current document or worker. // Opens the sandboxed filesystem for the origin of the current document or worker.
GetSandboxedFileSystem() => (NativeFileSystemError result, GetSandboxedFileSystem() => (NativeFileSystemError result,
NativeFileSystemDirectoryHandle? directory); NativeFileSystemDirectoryHandle? directory);
// Prompts the user to select a file from the native filesystem. Returns an // Prompts the user to select a file from the native filesystem. Returns an
// error code if something failed, or a list of the selected entries on // error code if something failed, or a list of the selected entries on
// success. // success.
...@@ -46,9 +46,9 @@ interface NativeFileSystemManager { ...@@ -46,9 +46,9 @@ interface NativeFileSystemManager {
array<ChooseFileSystemEntryAcceptsOption> accepts, array<ChooseFileSystemEntryAcceptsOption> accepts,
bool include_accepts_all) => bool include_accepts_all) =>
(NativeFileSystemError result, (NativeFileSystemError result,
array<NativeFileSystemEntry> entries); array<NativeFileSystemEntry> entries);
// TODO(mek): Add this method when it is needed for transferability of handles. // TODO(mek): Add this method when it is needed for transferability of handles.
// GetHandleFromToken(NativeFileSystemTransferToken token) => // GetHandleFromToken(NativeFileSystemTransferToken token) =>
// (NativeFileSystemError result, NativeFileSystemHandle? entry_handle); // (NativeFileSystemError result, NativeFileSystemHandle? entry_handle);
}; };
// Copyright 2019 The Chromium Authors. All rights reserved. // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
module ax.mojom; module ax.mojom;
// https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount // https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount
// https://www.w3.org/TR/wai-aria-1.1/#aria-colcount // https://www.w3.org/TR/wai-aria-1.1/#aria-colcount
// If the total number of (rows|columns) is unknown, authors MUST set the // If the total number of (rows|columns) is unknown, authors MUST set the
// value of aria-(rowcount|colcount) to -1 to indicate that the value should not // value of aria-(rowcount|colcount) to -1 to indicate that the value should not
// be calculated by the user agent. // be calculated by the user agent.
// See: AXTableInfo // See: AXTableInfo
const int32 kUnknownAriaColumnOrRowCount = -1; const int32 kUnknownAriaColumnOrRowCount = -1;
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