OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
6 #define CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // NavigationEntry. Currently only contains HAS_POST_DATA or 0. | 81 // NavigationEntry. Currently only contains HAS_POST_DATA or 0. |
82 void set_type_mask(int type_mask) { type_mask_ = type_mask; } | 82 void set_type_mask(int type_mask) { type_mask_ = type_mask; } |
83 int type_mask() const { return type_mask_; } | 83 int type_mask() const { return type_mask_; } |
84 | 84 |
85 // The index in the NavigationController. If this is -1, it means this | 85 // The index in the NavigationController. If this is -1, it means this |
86 // TabNavigation is bogus. | 86 // TabNavigation is bogus. |
87 // | 87 // |
88 // This is used when determining the selected TabNavigation and only useful | 88 // This is used when determining the selected TabNavigation and only useful |
89 // by BaseSessionService and SessionService. | 89 // by BaseSessionService and SessionService. |
90 void set_index(int index) { index_ = index; } | 90 void set_index(int index) { index_ = index; } |
91 int index() { return index_; } | 91 int index() const { return index_; } |
92 | 92 |
93 private: | 93 private: |
94 friend class BaseSessionService; | 94 friend class BaseSessionService; |
95 | 95 |
96 GURL virtual_url_; | 96 GURL virtual_url_; |
97 GURL referrer_; | 97 GURL referrer_; |
98 string16 title_; | 98 string16 title_; |
99 std::string state_; | 99 std::string state_; |
100 PageTransition::Type transition_; | 100 PageTransition::Type transition_; |
101 int type_mask_; | 101 int type_mask_; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // The tabs, ordered by visual order. | 182 // The tabs, ordered by visual order. |
183 std::vector<SessionTab*> tabs; | 183 std::vector<SessionTab*> tabs; |
184 | 184 |
185 // Is the window maximized? | 185 // Is the window maximized? |
186 bool is_maximized; | 186 bool is_maximized; |
187 | 187 |
188 private: | 188 private: |
189 DISALLOW_COPY_AND_ASSIGN(SessionWindow); | 189 DISALLOW_COPY_AND_ASSIGN(SessionWindow); |
190 }; | 190 }; |
191 | 191 |
| 192 // Defines a foreign session for session sync. A foreign session is a session |
| 193 // on a remote chrome instance. |
| 194 struct ForeignSession { |
| 195 ForeignSession(); |
| 196 ~ForeignSession(); |
| 197 |
| 198 // Unique tag for each session. |
| 199 std::string foreign_tession_tag; |
| 200 std::vector<SessionWindow*> windows; |
| 201 }; |
| 202 |
192 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 203 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
| 204 |
OLD | NEW |