File: ui.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 (105 lines) | stat: -rw-r--r-- 3,241 bytes parent folder | download | duplicates (8)
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
99
100
101
102
103
104
105
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto3";

package feedui;

option optimize_for = LITE_RUNTIME;

option java_package = "org.chromium.components.feed.proto";
option java_outer_classname = "FeedUiProto";

// This is a simplified and complete set of protos that define UI.
// It includes everything from search.now.ui needed in the UI, and excludes
// other data to reduce complexity. These proto messages should be constructible
// from the store protos.

// A stream is a list of chunks in order.
// Each StreamUpdate contains the full list of chunks,
// but subsequent StreamUpdates after the first may refer to
// chunks previously received by chunk_id.
message StreamUpdate {
  // Either a reference to an existing slice, or a new slice.
  message SliceUpdate {
    oneof update {
      Slice slice = 1;
      string slice_id = 2;
    }
  }
  // One entry for each slice in the stream, in the order they should be
  // presented. Existing slices not present in updated_slices should be dropped.
  repeated SliceUpdate updated_slices = 1;
  // Additional shared states to be used. Usually just one, and sent only on the
  // first update.
  repeated SharedState new_shared_states = 2;
  // Time of the last full server fetch. Populated only after the stream data is
  // loaded. Not updated on NextPage requests.
  int64 fetch_time_ms = 3;
  // Logging parameters to be associated with updated_slices.
  LoggingParameters logging_parameters = 4;
}

message LoggingParameters {
  // Either email or session_id should be set to enable activity logging.

  // The session ID is for signed out users.
  string session_id = 1;
  string email = 2;

  // A client ID used for reliability logging.
  string client_instance_id = 3;

  // Whether attention / interaction logging is enabled.
  bool logging_enabled = 4;
  // Whether view actions may be recorded.
  bool view_actions_enabled = 5;
  // The EventID of the first page response. Must be present for attention
  // logging.
  bytes root_event_id = 6;
}

// A horizontal slice of UI to be presented in the vertical-scrolling feed.
message Slice {
  // Deprecated slice metadata
  reserved 5;

  oneof SliceData {
    XSurfaceSlice xsurface_slice = 1;
    ZeroStateSlice zero_state_slice = 3;
    LoadingSpinnerSlice loading_spinner_slice = 4;
  }
  string slice_id = 2;
}

// This slice is sent when no feed data can be loaded.
message ZeroStateSlice {
  enum Type {
    UNKNOWN = 0;
    // A generic error that explains there are no cards available.
    NO_CARDS_AVAILABLE = 1;
    // An error indicating there were problems refreshing the feed.
    CANT_REFRESH = 2;
    // There is no content because there are no web feed subscriptions.
    NO_WEB_FEED_SUBSCRIPTIONS = 3;
  };
  Type type = 1;
}

// An indicator that the feed is loading.
message LoadingSpinnerSlice {
  // True if the spinner is at the top of the feed. Otherwise, it is at the
  // bottom.
  bool is_at_top = 1;
}

message XSurfaceSlice {
  bytes xsurface_frame = 1;
}

// Wraps an XSurface shared state with a unique ID.
message SharedState {
  string id = 1;
  bytes xsurface_shared_state = 2;
}