naiveproxy/ui/message_center/public/mojo/notification.mojom

93 lines
2.6 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
// 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 message_center.mojom;
import "mojo/public/mojom/base/time.mojom";
import "mojo/public/mojom/base/string16.mojom";
import "ui/gfx/image/mojo/image.mojom";
import "ui/message_center/public/mojo/notifier_id.mojom";
import "url/mojom/url.mojom";
// Matches message_center::NotificationType.
enum NotificationType {
SIMPLE = 0,
BASE_FORMAT = 1,
IMAGE = 2,
MULTIPLE = 3,
PROGRESS = 4,
CUSTOM = 5,
};
// Matches message_center::SettingsButtonHandler.
enum SettingsButtonHandler {
NONE = 0,
INLINE = 1,
DELEGATE = 2,
};
// Matches message_center::FullscreenVisibility.
enum FullscreenVisibility {
NONE= 0,
OVER_USER = 1,
};
// The fields and their meanings match message_center::NotificationItem.
struct NotificationItem {
mojo_base.mojom.String16 title;
mojo_base.mojom.String16 message;
};
// The fields and their meanings match message_center::ButtonInfo.
struct ButtonInfo {
mojo_base.mojom.String16 title;
gfx.mojom.ImageSkia? icon;
mojo_base.mojom.String16? placeholder;
};
// These fields and their meanings are identical to those in
// message_center::RichNotificationData.
struct RichNotificationData {
int32 priority;
bool never_time_out;
mojo_base.mojom.Time timestamp;
// |context_message| intentionally omitted. See https://crbug.com/797084
gfx.mojom.ImageSkia? image;
gfx.mojom.ImageSkia? small_image;
array<NotificationItem> items;
int32 progress;
mojo_base.mojom.String16 progress_status;
array<ButtonInfo> buttons;
bool should_make_spoken_feedback_for_popup_updates;
bool pinned;
// |vibration_pattern| intentionally omitted
bool renotify;
// |silent| intentionally omitted
mojo_base.mojom.String16 accessible_name;
string vector_small_image_id;
uint32 accent_color;
SettingsButtonHandler settings_button_handler;
FullscreenVisibility fullscreen_visibility;
};
struct Notification {
NotificationType type;
// TODO(mhashmi): Server-side code (in Ash) needs to make sure this id won't
// collide with ids from different clients
string id;
mojo_base.mojom.String16 title;
mojo_base.mojom.String16 message;
gfx.mojom.ImageSkia? icon;
mojo_base.mojom.String16 display_source;
url.mojom.Url origin_url;
NotifierId notifier_id;
RichNotificationData optional_fields;
// |serial_number_| intentionally omitted.
// |shown_as_popup_| intentionally omitted.
// |is_read_| intentionally omitted.
// |delegate_| intentionally omitted.
};