1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Sync protocol datatype extension for sessions.
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
8 // any fields in this file.
12 option optimize_for = LITE_RUNTIME;
13 option retain_unknown_fields = true;
17 import "sync_enums.proto";
19 message SessionSpecifics {
20 // Unique id for the client.
21 optional string session_tag = 1;
22 optional SessionHeader header = 2;
23 optional SessionTab tab = 3;
25 // The local tab id used by sync. Unique across all nodes for that client.
26 optional int32 tab_node_id = 4 [default = -1];
29 // Properties of session sync objects.
30 message SessionHeader {
31 // Each session is composed of windows.
32 repeated SessionWindow window = 2;
33 // A non-unique but human-readable name to describe this client.
34 optional string client_name = 3;
35 // The type of device.
45 optional DeviceType device_type = 4;
48 message SessionWindow {
49 // Unique (to the owner) id for this window.
50 optional int32 window_id = 1;
51 // Index of the selected tab in tabs; -1 if no tab is selected.
52 optional int32 selected_tab_index = 2 [default = -1];
53 // Type of the browser. Currently we only store browsers of type
54 // TYPE_TABBED and TYPE_POPUP.
59 optional BrowserType browser_type = 3 [default = TYPE_TABBED];
60 // The tabs that compose a window (correspond to tab id's).
61 repeated int32 tab = 4;
65 // Unique (to the owner) id for this tab.
66 optional int32 tab_id = 1;
67 // The unique id for the window this tab belongs to.
68 optional int32 window_id = 2;
69 // Visual index of the tab within its window. There may be gaps in these
71 optional int32 tab_visual_index = 3 [default = -1];
72 // Identifies the index of the current navigation in navigations. For
73 // example, if this is 2 it means the current navigation is navigations[2].
74 optional int32 current_navigation_index = 4 [default = -1];
75 // True if the tab is pinned.
76 optional bool pinned = 5 [default = false];
77 // If non-empty, this tab is an app tab and this is the id of the extension.
78 optional string extension_app_id = 6;
79 // Tabs are navigated, and the navigation data is here.
80 repeated TabNavigation navigation = 7;
81 // The favicon for the current url the tab is displaying. Either empty
82 // or a valid PNG encoded favicon.
83 optional bytes favicon = 8;
84 // The type of favicon. For now only normal web favicons are supported.
88 optional FaviconType favicon_type = 9;
89 // The url of the actual favicon (as opposed to the page using the favicon).
90 optional string favicon_source = 11;
93 message TabNavigation {
94 // The index in the NavigationController. If this is -1, it means this
95 // TabNavigation is bogus.
96 // optional int32 index = 1 [default = -1]; // obsolete.
97 // The virtual URL, when nonempty, will override the actual URL of the page
98 // when we display it to the user.
99 optional string virtual_url = 2;
100 // The referring URL, which can be empty.
101 optional string referrer = 3;
102 // The title of the page.
103 optional string title = 4;
104 // Content state is an opaque blob created by WebKit that represents the
105 // state of the page. This includes form entries and scroll position for each
107 optional string state = 5;
108 optional SyncEnums.PageTransition page_transition = 6 [default = TYPED];
109 optional SyncEnums.PageTransitionQualifier navigation_qualifier = 7;
110 // The unique navigation id (within this client).
111 optional int32 unique_id = 8;
112 // Timestamp for when this navigation last occurred (in client time).
113 // If the user goes back/foward in history the timestamp may refresh.
114 optional int64 timestamp = 9;