naiveproxy/ui/message_center/mojo/notification.mojom

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-01-28 21:32:06 +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/common/string16.mojom";
import "ui/gfx/image/mojo/image.mojom";
import "url/mojo/url.mojom";
// Matches message_center::NotificationType.
enum NotificationType {
SIMPLE = 0,
BASE_FORMAT = 1,
IMAGE = 2,
MULTIPLE = 3,
PROGRESS = 4,
CUSTOM = 5,
};
// These fields and their meanings are identical to those in
// message_center::RichNotificationData.
// TODO(estade): Add the rest of the fields for RichNotificationData.
struct RichNotificationData {
int32 progress;
mojo.common.mojom.String16 progress_status;
bool should_make_spoken_feedback_for_popup_updates;
bool clickable;
bool pinned;
mojo.common.mojom.String16 accessible_name;
uint32 accent_color;
bool use_image_as_icon;
};
// TODO(mhashmi): Add the rest of the fields for a Notification
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.common.mojom.String16 title;
mojo.common.mojom.String16 message;
gfx.mojom.ImageSkia? icon;
mojo.common.mojom.String16 display_source;
url.mojom.Url origin_url;
RichNotificationData optional_fields;
};