| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 int type_mask() const { return type_mask_; } | 82 int type_mask() const { return type_mask_; } |
| 83 | 83 |
| 84 // The index in the NavigationController. If this is -1, it means this | 84 // The index in the NavigationController. If this is -1, it means this |
| 85 // TabNavigation is bogus. | 85 // TabNavigation is bogus. |
| 86 // | 86 // |
| 87 // This is used when determining the selected TabNavigation and only useful | 87 // This is used when determining the selected TabNavigation and only useful |
| 88 // by BaseSessionService and SessionService. | 88 // by BaseSessionService and SessionService. |
| 89 void set_index(int index) { index_ = index; } | 89 void set_index(int index) { index_ = index; } |
| 90 int index() const { return index_; } | 90 int index() const { return index_; } |
| 91 | 91 |
| 92 // The URL that initially spawned the NavigationEntry. |
| 93 const GURL& original_request_url() const { return original_request_url_; } |
| 94 void set_original_request_url(const GURL& url) { |
| 95 original_request_url_ = url; |
| 96 } |
| 97 |
| 92 // Converts a set of TabNavigations into a set of NavigationEntrys. The | 98 // Converts a set of TabNavigations into a set of NavigationEntrys. The |
| 93 // caller owns the NavigationEntrys. | 99 // caller owns the NavigationEntrys. |
| 94 static void CreateNavigationEntriesFromTabNavigations( | 100 static void CreateNavigationEntriesFromTabNavigations( |
| 95 Profile* profile, | 101 Profile* profile, |
| 96 const std::vector<TabNavigation>& navigations, | 102 const std::vector<TabNavigation>& navigations, |
| 97 std::vector<content::NavigationEntry*>* entries); | 103 std::vector<content::NavigationEntry*>* entries); |
| 98 | 104 |
| 99 private: | 105 private: |
| 100 friend class BaseSessionService; | 106 friend class BaseSessionService; |
| 101 | 107 |
| 102 GURL virtual_url_; | 108 GURL virtual_url_; |
| 103 content::Referrer referrer_; | 109 content::Referrer referrer_; |
| 104 string16 title_; | 110 string16 title_; |
| 105 std::string state_; | 111 std::string state_; |
| 106 content::PageTransition transition_; | 112 content::PageTransition transition_; |
| 107 int type_mask_; | 113 int type_mask_; |
| 108 int64 post_id_; | 114 int64 post_id_; |
| 109 | 115 |
| 110 int index_; | 116 int index_; |
| 117 GURL original_request_url_; |
| 111 }; | 118 }; |
| 112 | 119 |
| 113 // SessionTab ---------------------------------------------------------------- | 120 // SessionTab ---------------------------------------------------------------- |
| 114 | 121 |
| 115 // SessionTab corresponds to a NavigationController. | 122 // SessionTab corresponds to a NavigationController. |
| 116 struct SessionTab { | 123 struct SessionTab { |
| 117 SessionTab(); | 124 SessionTab(); |
| 118 ~SessionTab(); | 125 ~SessionTab(); |
| 119 | 126 |
| 120 // Unique id of the window. | 127 // Unique id of the window. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // Is the window maximized, minimized, or normal? | 207 // Is the window maximized, minimized, or normal? |
| 201 ui::WindowShowState show_state; | 208 ui::WindowShowState show_state; |
| 202 | 209 |
| 203 std::string app_name; | 210 std::string app_name; |
| 204 | 211 |
| 205 private: | 212 private: |
| 206 DISALLOW_COPY_AND_ASSIGN(SessionWindow); | 213 DISALLOW_COPY_AND_ASSIGN(SessionWindow); |
| 207 }; | 214 }; |
| 208 | 215 |
| 209 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 216 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
| OLD | NEW |