| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 int type_mask() const { return type_mask_; } | 76 int type_mask() const { return type_mask_; } |
| 77 | 77 |
| 78 // The index in the NavigationController. If this is -1, it means this | 78 // The index in the NavigationController. If this is -1, it means this |
| 79 // TabNavigation is bogus. | 79 // TabNavigation is bogus. |
| 80 // | 80 // |
| 81 // This is used when determining the selected TabNavigation and only useful | 81 // This is used when determining the selected TabNavigation and only useful |
| 82 // by BaseSessionService and SessionService. | 82 // by BaseSessionService and SessionService. |
| 83 void set_index(int index) { index_ = index; } | 83 void set_index(int index) { index_ = index; } |
| 84 int index() const { return index_; } | 84 int index() const { return index_; } |
| 85 | 85 |
| 86 // The extra headers. |
| 87 void set_extra_headers(const std::string& extra_headers) { |
| 88 extra_headers_ = extra_headers; |
| 89 } |
| 90 const std::string& extra_headers() const { return extra_headers_; } |
| 91 |
| 92 // State bits. |
| 86 // Converts a set of TabNavigations into a set of NavigationEntrys. The | 93 // Converts a set of TabNavigations into a set of NavigationEntrys. The |
| 87 // caller owns the NavigationEntrys. | 94 // caller owns the NavigationEntrys. |
| 88 static void CreateNavigationEntriesFromTabNavigations( | 95 static void CreateNavigationEntriesFromTabNavigations( |
| 89 Profile* profile, | 96 Profile* profile, |
| 90 const std::vector<TabNavigation>& navigations, | 97 const std::vector<TabNavigation>& navigations, |
| 91 std::vector<NavigationEntry*>* entries); | 98 std::vector<NavigationEntry*>* entries); |
| 92 | 99 |
| 93 private: | 100 private: |
| 94 friend class BaseSessionService; | 101 friend class BaseSessionService; |
| 95 | 102 |
| 96 GURL virtual_url_; | 103 GURL virtual_url_; |
| 97 GURL referrer_; | 104 GURL referrer_; |
| 98 string16 title_; | 105 string16 title_; |
| 99 std::string state_; | 106 std::string state_; |
| 100 PageTransition::Type transition_; | 107 PageTransition::Type transition_; |
| 101 int type_mask_; | 108 int type_mask_; |
| 109 std::string extra_headers_; |
| 102 | 110 |
| 103 int index_; | 111 int index_; |
| 104 }; | 112 }; |
| 105 | 113 |
| 106 // SessionTab ---------------------------------------------------------------- | 114 // SessionTab ---------------------------------------------------------------- |
| 107 | 115 |
| 108 // SessionTab corresponds to a NavigationController. | 116 // SessionTab corresponds to a NavigationController. |
| 109 struct SessionTab { | 117 struct SessionTab { |
| 110 SessionTab(); | 118 SessionTab(); |
| 111 ~SessionTab(); | 119 ~SessionTab(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 struct SyncedSession { | 210 struct SyncedSession { |
| 203 SyncedSession(); | 211 SyncedSession(); |
| 204 ~SyncedSession(); | 212 ~SyncedSession(); |
| 205 | 213 |
| 206 // Unique tag for each session. | 214 // Unique tag for each session. |
| 207 std::string session_tag; | 215 std::string session_tag; |
| 208 std::vector<SessionWindow*> windows; | 216 std::vector<SessionWindow*> windows; |
| 209 }; | 217 }; |
| 210 | 218 |
| 211 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 219 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
| OLD | NEW |