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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 92 // The URL that initially spawned the NavigationEntry. |
93 const GURL& original_request_url() const { return original_request_url_; } | 93 const GURL& original_request_url() const { return original_request_url_; } |
94 void set_original_request_url(const GURL& url) { | 94 void set_original_request_url(const GURL& url) { |
95 original_request_url_ = url; | 95 original_request_url_ = url; |
96 } | 96 } |
97 | 97 |
| 98 // Whether or not we're overriding the standard user agent. |
| 99 bool override_user_agent() const { return override_user_agent_; } |
| 100 void set_override_user_agent(bool state) { override_user_agent_ = state; } |
| 101 |
98 // Converts a set of TabNavigations into a set of NavigationEntrys. The | 102 // Converts a set of TabNavigations into a set of NavigationEntrys. The |
99 // caller owns the NavigationEntrys. | 103 // caller owns the NavigationEntrys. |
100 static void CreateNavigationEntriesFromTabNavigations( | 104 static void CreateNavigationEntriesFromTabNavigations( |
101 Profile* profile, | 105 Profile* profile, |
102 const std::vector<TabNavigation>& navigations, | 106 const std::vector<TabNavigation>& navigations, |
103 std::vector<content::NavigationEntry*>* entries); | 107 std::vector<content::NavigationEntry*>* entries); |
104 | 108 |
105 private: | 109 private: |
106 friend class BaseSessionService; | 110 friend class BaseSessionService; |
107 | 111 |
108 GURL virtual_url_; | 112 GURL virtual_url_; |
109 content::Referrer referrer_; | 113 content::Referrer referrer_; |
110 string16 title_; | 114 string16 title_; |
111 std::string state_; | 115 std::string state_; |
112 content::PageTransition transition_; | 116 content::PageTransition transition_; |
113 int type_mask_; | 117 int type_mask_; |
114 int64 post_id_; | 118 int64 post_id_; |
115 | 119 |
116 int index_; | 120 int index_; |
117 GURL original_request_url_; | 121 GURL original_request_url_; |
| 122 bool override_user_agent_; |
118 }; | 123 }; |
119 | 124 |
120 // SessionTab ---------------------------------------------------------------- | 125 // SessionTab ---------------------------------------------------------------- |
121 | 126 |
122 // SessionTab corresponds to a NavigationController. | 127 // SessionTab corresponds to a NavigationController. |
123 struct SessionTab { | 128 struct SessionTab { |
124 SessionTab(); | 129 SessionTab(); |
125 ~SessionTab(); | 130 ~SessionTab(); |
126 | 131 |
127 // Unique id of the window. | 132 // Unique id of the window. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Is the window maximized, minimized, or normal? | 212 // Is the window maximized, minimized, or normal? |
208 ui::WindowShowState show_state; | 213 ui::WindowShowState show_state; |
209 | 214 |
210 std::string app_name; | 215 std::string app_name; |
211 | 216 |
212 private: | 217 private: |
213 DISALLOW_COPY_AND_ASSIGN(SessionWindow); | 218 DISALLOW_COPY_AND_ASSIGN(SessionWindow); |
214 }; | 219 }; |
215 | 220 |
216 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ | 221 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ |
OLD | NEW |