File: notification_database_data.proto

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (98 lines) | stat: -rw-r--r-- 3,024 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package content;

// Stores information about a Web Notification. This message is the protocol
// buffer meant to serialize the content::NotificationDatabaseData structure.
//
// Next tag: 17
message NotificationDatabaseDataProto {
  enum ClosedReason {
    USER = 0;
    DEVELOPER = 1;
    UNKNOWN = 2;
  }

  // DEPRECATED: Use |notification_id| instead.
  optional int64 persistent_notification_id = 1;

  optional string notification_id = 5;

  optional string origin = 2;
  optional int64 service_worker_registration_id = 3;
  optional bool replaced_existing_notification = 6;
  optional int32 num_clicks = 7;
  optional int32 num_action_button_clicks = 8;
  optional int64 creation_time_millis = 9;
  optional int64 time_until_first_click_millis = 10;
  optional int64 time_until_last_click_millis = 11;
  optional int64 time_until_close_millis = 12;
  optional ClosedReason closed_reason = 13;

  // A notification action, corresponds to blink::PlatformNotificationAction.
  //
  // Next tag: 6
  message NotificationAction {
    // Corresponds to blink::mojom::NotificationActionType.
    enum Type {
      BUTTON = 0;
      TEXT = 1;
    }

    optional string action = 1;
    optional string title = 2;
    optional string icon = 3;
    optional Type type = 4;
    optional string placeholder = 5;
  }

  // Actual data payload of the notification. This message is the protocol
  // buffer meant to serialize the blink::PlatformNotificationData structure.
  //
  // Next tag: 17
  message NotificationData {
    enum Direction {
      LEFT_TO_RIGHT = 0;
      RIGHT_TO_LEFT = 1;
      AUTO = 2;
    }

    optional string title = 1;
    optional Direction direction = 2;
    optional string lang = 3;
    optional string body = 4;
    optional string tag = 5;
    optional string image = 15;
    optional string icon = 6;
    optional string badge = 14;
    repeated int32 vibration_pattern = 9 [packed=true];
    optional int64 timestamp = 12;
    optional bool renotify = 13;
    optional bool silent = 7;
    optional bool require_interaction = 11;
    optional bytes data = 8;
    repeated NotificationAction actions = 10;
    // Stored as offset from the windows epoch in microseconds.
    optional int64 show_trigger_timestamp = 16;
  }

  optional NotificationData notification_data = 4;

  // Keeps track if a notification with a |show_trigger_timestamp| has been
  // displayed already.
  optional bool has_triggered = 14;

  // Flag for notifications shown by the browser that should not be visible to
  // the origin when requesting a list of notifications.
  optional bool is_shown_by_browser = 15;

  // Notification metadata map, where the key is the type of metadata and the
  // value is any string value of data, such as a serialized dictionary.
  map<string, string> serialized_metadata = 16;
}