diff options
author | jerrica@google.com <jerrica@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 01:01:53 +0000 |
---|---|---|
committer | jerrica@google.com <jerrica@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 01:01:53 +0000 |
commit | 653d45158f0faf6536283fd07c5d683e18c630d7 (patch) | |
tree | 4cb958d092c249c330252d859478c8317faece0f /chrome/browser/sync/protocol | |
parent | bb442fe7773f37f341b010662e8319e98ad5e811 (diff) | |
download | chromium_src-653d45158f0faf6536283fd07c5d683e18c630d7.zip chromium_src-653d45158f0faf6536283fd07c5d683e18c630d7.tar.gz chromium_src-653d45158f0faf6536283fd07c5d683e18c630d7.tar.bz2 |
sync: Add sessions to protocol and chromiumsync python test server.
BUG=30519
Review URL: http://codereview.chromium.org/3107008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/protocol')
-rw-r--r-- | chrome/browser/sync/protocol/session_specifics.proto | 91 | ||||
-rw-r--r-- | chrome/browser/sync/protocol/sync_proto.gyp | 1 |
2 files changed, 92 insertions, 0 deletions
diff --git a/chrome/browser/sync/protocol/session_specifics.proto b/chrome/browser/sync/protocol/session_specifics.proto new file mode 100644 index 0000000..e3c7dd5 --- /dev/null +++ b/chrome/browser/sync/protocol/session_specifics.proto @@ -0,0 +1,91 @@ +// Copyright (c) 2010 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. +// +// Sync protocol datatype extension for sessions. + +syntax = "proto2"; + +// option optimize_for = LITE_RUNTIME; + +package sync_pb; + +import "sync.proto"; + +// Properties of session sync objects. +message SessionSpecifics { + // Unique id for the session. + optional string session_tag = 1; + // Each session is composed of windows. + repeated SessionWindow session_window = 2; +} +message SessionWindow { + // Index of the selected tab in tabs; -1 if no tab is selected. + optional int32 selected_tab_index = 2 [default = -1]; + // Type of the browser. Currently we only store browsers of type + // TYPE_NORMAL and TYPE_POPUP. + enum BrowserType { + TYPE_NORMAL = 1; + TYPE_POPUP = 2; + } + optional BrowserType browser_type = 3 [default = TYPE_NORMAL]; + // The tabs that compose a window. + repeated SessionTab session_tab= 4; +} +message SessionTab { + // Visual index of the tab within its window. There may be gaps in these + // values. + optional int32 tab_visual_index = 2 [default = -1]; + // Identifies the index of the current navigation in navigations. For + // example, if this is 2 it means the current navigation is navigations[2]. + optional int32 current_navigation_index = 3 [default = -1]; + // True if the tab is pinned. + optional bool pinned = 4 [default = false]; + // If non-empty, this tab is an app tab and this is the id of the extension. + optional string extension_app_id = 5; + // Tabs are navigated, and the navigation data is here. + repeated TabNavigation navigation = 6; +} +message TabNavigation { + // The index in the NavigationController. If this is -1, it means this + // TabNavigation is bogus. + optional int32 index = 1 [default = -1]; + // The virtual URL, when nonempty, will override the actual URL of the page + // when we display it to the user. + optional string virtual_url = 2; + // The referring URL, which can be empty. + optional string referrer = 3; + // The title of the page. + optional string title = 4; + // Content state is an opaque blob created by WebKit that represents the + // state of the page. This includes form entries and scroll position for each + // frame. + optional string state = 5; + // Types of transitions between pages. + enum PageTransition{ + LINK = 0; + TYPED = 1; + AUTO_BOOKMARK = 2; + AUTO_SUBFRAME = 3; + MANUAL_SUBFRAME = 4; + GENERATED = 5; + START_PAGE = 6; + FORM_SUBMIT = 7; + RELOAD = 8; + KEYWORD = 9; + KEYWORD_GENERATED = 10; + CHAIN_START = 12; + CHAIN_END = 13; + } + // These qualifiers further define the transition. + enum PageTransitionQualifier { + CLIENT_REDIRECT = 1; + SERVER_REDIRECT = 2; + } + optional PageTransition page_transition = 6 [default = TYPED]; + optional PageTransitionQualifier navigation_qualifier = 7; +} + +extend EntitySpecifics { + optional SessionSpecifics session = 50119; +} diff --git a/chrome/browser/sync/protocol/sync_proto.gyp b/chrome/browser/sync/protocol/sync_proto.gyp index 8d8582e..fad9d41 100644 --- a/chrome/browser/sync/protocol/sync_proto.gyp +++ b/chrome/browser/sync/protocol/sync_proto.gyp @@ -22,6 +22,7 @@ 'nigori_specifics.proto', 'password_specifics.proto', 'preference_specifics.proto', + 'session_specifics.proto', 'theme_specifics.proto', 'typed_url_specifics.proto', ], |