mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 22:36:09 +03:00
74 lines
2.1 KiB
Plaintext
74 lines
2.1 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.
|
||
|
//
|
||
|
// Next MinVersion: 3
|
||
|
|
||
|
module arc.mojom;
|
||
|
|
||
|
import "mojo/common/string16.mojom";
|
||
|
import "screen_rect.mojom";
|
||
|
|
||
|
// Represents the start and end unicode char indices of the selected
|
||
|
// portion of the text [start, end).
|
||
|
struct TextSelection {
|
||
|
int32 start_selection;
|
||
|
int32 end_selection;
|
||
|
};
|
||
|
|
||
|
// Represents view structure to be passed to ARC. The view
|
||
|
// structure is synthesized from the AXStructure, which
|
||
|
// is a simplified representation of the DOM tree. We
|
||
|
// map each node of the AXStructure into a view element.
|
||
|
// The naming convention of the fields kept consistent with
|
||
|
// AccessibilitySnapshotNode.java used in Android Chromium.
|
||
|
struct VoiceInteractionStructure {
|
||
|
// Geometry of the view in pixels
|
||
|
ScreenRect rect;
|
||
|
|
||
|
// Text of the view.
|
||
|
mojo.common.mojom.String16 text;
|
||
|
|
||
|
// Text properties
|
||
|
float text_size;
|
||
|
int32 color;
|
||
|
int32 bgcolor;
|
||
|
bool bold;
|
||
|
bool italic;
|
||
|
bool underline;
|
||
|
bool line_through;
|
||
|
|
||
|
// Selected portion of the text.
|
||
|
TextSelection? selection;
|
||
|
|
||
|
// Fake Android view class name of the element. Each node is assigned
|
||
|
// a closest approximation of Android's views.
|
||
|
string class_name;
|
||
|
|
||
|
// Children of current node
|
||
|
array<VoiceInteractionStructure> children;
|
||
|
|
||
|
// Accessibility functionality of the node inferred from DOM or based on HTML
|
||
|
// role attribute.
|
||
|
[MinVersion=2] string? role;
|
||
|
};
|
||
|
|
||
|
// Handles voice interaction queries from Android.
|
||
|
// Next method ID: 3
|
||
|
interface VoiceInteractionArcHomeHost {
|
||
|
// Returns view hierarchy of current window represented as
|
||
|
// VoiceInteractionStructure. Returns empty if the request
|
||
|
// fails.
|
||
|
GetVoiceInteractionStructure@1() => (VoiceInteractionStructure? structure);
|
||
|
|
||
|
// Notifies VoiceInteractionArcHomeHost that voice interaction OOBE setup
|
||
|
// is done.
|
||
|
[MinVersion=1] OnVoiceInteractionOobeSetupComplete@2();
|
||
|
};
|
||
|
|
||
|
// Connects with ArcHome.
|
||
|
// Next method ID: 1
|
||
|
interface VoiceInteractionArcHomeInstance {
|
||
|
Init@0(VoiceInteractionArcHomeHost host_ptr);
|
||
|
};
|