mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
67 lines
2.4 KiB
Plaintext
67 lines
2.4 KiB
Plaintext
// Copyright 2017 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 content.mojom;
|
|
|
|
import "mojo/common/file.mojom";
|
|
import "mojo/common/string16.mojom";
|
|
import "url/mojo/origin.mojom";
|
|
|
|
// WebDatabase messages sent from the browser to the renderer.
|
|
interface WebDatabase {
|
|
// Notifies the renderer process of the new database size.
|
|
UpdateSize(url.mojom.Origin origin,
|
|
mojo.common.mojom.String16 name,
|
|
int64 size);
|
|
|
|
// Asks the renderer process to close a database immediately.
|
|
CloseImmediately(url.mojom.Origin origin, mojo.common.mojom.String16 name);
|
|
};
|
|
|
|
interface WebDatabaseHost {
|
|
// Asks the browser process to open a DB file with the given name.
|
|
[Sync]
|
|
OpenFile(mojo.common.mojom.String16 vfs_file_name,
|
|
int32 desired_flags) => (mojo.common.mojom.File? file);
|
|
|
|
// Asks the browser process to delete a DB file.
|
|
[Sync]
|
|
DeleteFile(mojo.common.mojom.String16 vfs_file_name,
|
|
bool sync_dir) => (int32 sqlite_error_code);
|
|
|
|
// Asks the browser process to return the attributes of a DB file.
|
|
[Sync]
|
|
GetFileAttributes(mojo.common.mojom.String16 vfs_file_name) => (
|
|
int32 attributes);
|
|
|
|
// Asks the browser process to return the size of a DB file.
|
|
[Sync]
|
|
GetFileSize(mojo.common.mojom.String16 vfs_file_name) => (int64 size);
|
|
|
|
// Asks the browser set the size of a DB file.
|
|
[Sync]
|
|
SetFileSize(mojo.common.mojom.String16 vfs_file_name,
|
|
int64 expected_size) => (bool success);
|
|
|
|
// Asks the browser process for the amount of space available to an origin.
|
|
[Sync]
|
|
GetSpaceAvailable(url.mojom.Origin origin) => (int64 space_available);
|
|
|
|
// Notifies the browser process that a new database has been opened
|
|
Opened(url.mojom.Origin origin, mojo.common.mojom.String16 database_name,
|
|
mojo.common.mojom.String16 database_description, int64 estimated_size);
|
|
|
|
// Notifies the browser process that a database might have been modified
|
|
Modified(url.mojom.Origin origin, mojo.common.mojom.String16 database_name);
|
|
|
|
// Notifies the browser process that a database is about to close
|
|
Closed(url.mojom.Origin origin, mojo.common.mojom.String16 database_name);
|
|
|
|
// Sent when a sqlite error indicates the database is corrupt.
|
|
HandleSqliteError(url.mojom.Origin origin,
|
|
mojo.common.mojom.String16 database_name,
|
|
int32 error);
|
|
|
|
};
|