Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: components/sessions/core/session_types.h

Issue 2499023004: [Sync] Introduce SyncedSessionWindow type. (Closed)
Patch Set: Fix compile Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_
6 #define COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_ 6 #define COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Timestamp for when this tab was last activated. As these use TimeTicks, 96 // Timestamp for when this tab was last activated. As these use TimeTicks,
97 // they should not be compared with one another, unless it's within the same 97 // they should not be compared with one another, unless it's within the same
98 // chrome session. 98 // chrome session.
99 base::TimeTicks last_active_time; 99 base::TimeTicks last_active_time;
100 100
101 std::vector<sessions::SerializedNavigationEntry> navigations; 101 std::vector<sessions::SerializedNavigationEntry> navigations;
102 102
103 // For reassociating sessionStorage. 103 // For reassociating sessionStorage.
104 std::string session_storage_persistent_id; 104 std::string session_storage_persistent_id;
105 105
106 // Ids of the currently assigned variations which should be sent to sync.
107 std::vector<variations::VariationID> variation_ids;
108
109 private: 106 private:
110 DISALLOW_COPY_AND_ASSIGN(SessionTab); 107 DISALLOW_COPY_AND_ASSIGN(SessionTab);
111 }; 108 };
112 109
113 // SessionWindow ------------------------------------------------------------- 110 // SessionWindow -------------------------------------------------------------
114 111
115 // Describes a saved window. 112 // Describes a saved window.
116 struct SESSIONS_EXPORT SessionWindow { 113 struct SESSIONS_EXPORT SessionWindow {
117 SessionWindow(); 114 SessionWindow();
118 ~SessionWindow(); 115 ~SessionWindow();
119 116
120 // Possible window types which can be stored here. Note that these values will 117 // Possible window types which can be stored here. Note that these values will
121 // be written out to disc via session commands. 118 // be written out to disc via session commands.
122 enum WindowType { 119 enum WindowType {
123 TYPE_TABBED = 0, 120 TYPE_TABBED = 0,
124 TYPE_POPUP = 1 121 TYPE_POPUP = 1
125 }; 122 };
126 123
127 // Convert this object into its sync protocol buffer equivalent. Note that
128 // not all fields are synced here, because they don't all make sense or
129 // translate when restoring a SessionWindow on another device.
130 sync_pb::SessionWindow ToSyncData() const;
131
132 // Identifier of the window. 124 // Identifier of the window.
133 SessionID window_id; 125 SessionID window_id;
134 126
135 // Bounds of the window. 127 // Bounds of the window.
136 gfx::Rect bounds; 128 gfx::Rect bounds;
137 129
138 // The workspace in which the window resides. 130 // The workspace in which the window resides.
139 std::string workspace; 131 std::string workspace;
140 132
141 // Index of the selected tab in tabs; -1 if no tab is selected. After restore 133 // Index of the selected tab in tabs; -1 if no tab is selected. After restore
(...skipping 26 matching lines...) Expand all
168 160
169 std::string app_name; 161 std::string app_name;
170 162
171 private: 163 private:
172 DISALLOW_COPY_AND_ASSIGN(SessionWindow); 164 DISALLOW_COPY_AND_ASSIGN(SessionWindow);
173 }; 165 };
174 166
175 } // namespace sessions 167 } // namespace sessions
176 168
177 #endif // COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_ 169 #endif // COMPONENTS_SESSIONS_CORE_SESSION_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698