mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 22:36:09 +03:00
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
// 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 ash.mojom;
|
|
|
|
// The type of icon the sink is associated with. These values match
|
|
// media_router::SinkIconType.
|
|
enum SinkIconType {
|
|
CAST = 0,
|
|
CAST_AUDIO_GROUP = 1,
|
|
CAST_AUDIO = 2,
|
|
MEETING = 3,
|
|
HANGOUT = 4,
|
|
EDUCATION = 5,
|
|
WIRED_DISPLAY = 6,
|
|
GENERIC = 7
|
|
};
|
|
|
|
struct CastSink {
|
|
string id;
|
|
string name;
|
|
string domain;
|
|
|
|
// Icon which describes the type of sink media is being routed to.
|
|
SinkIconType sink_icon_type = SinkIconType.GENERIC;
|
|
};
|
|
|
|
enum ContentSource {
|
|
UNKNOWN,
|
|
TAB,
|
|
DESKTOP
|
|
};
|
|
|
|
struct CastRoute {
|
|
string id;
|
|
string title;
|
|
|
|
// Is the activity source this computer? ie, are we mirroring the display?
|
|
bool is_local_source = false;
|
|
|
|
// What is source of the content? For example, we could be DIAL casting a
|
|
// tab or mirroring the entire desktop.
|
|
ContentSource content_source = ContentSource.UNKNOWN;
|
|
};
|
|
|
|
struct SinkAndRoute {
|
|
CastSink sink;
|
|
CastRoute route;
|
|
};
|
|
|
|
// Allows clients (e.g. Chrome browser) to interface with the cast item in the
|
|
// system tray.
|
|
interface CastConfig {
|
|
// Sets the client interface. This client interface will receive commands from
|
|
// ash and provide OnDevicesUpdated() calls.
|
|
SetClient(associated CastConfigClient client);
|
|
|
|
// Invoked whenever there is new sink or route information available.
|
|
OnDevicesUpdated(array<SinkAndRoute> device);
|
|
};
|
|
|
|
// This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|,
|
|
// to access the cast system.
|
|
//
|
|
// TODO(erg): Eventually, this should no longer be exported by chrome, but
|
|
// should be exported by a separate cast service.
|
|
interface CastConfigClient {
|
|
// Request fresh data from the backend. When the data is available, all
|
|
// registered observers will get called.
|
|
RequestDeviceRefresh();
|
|
|
|
// Initiate a casting session to |sink|.
|
|
CastToSink(CastSink sink);
|
|
|
|
// A user-initiated request to stop the given cast session.
|
|
StopCasting(CastRoute route);
|
|
};
|