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

Side by Side Diff: chrome/browser/sessions/session_types.h

Issue 10832080: Upstream session_backend_android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/sessions/session_service_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool is_overriding_user_agent_; 123 bool is_overriding_user_agent_;
124 }; 124 };
125 125
126 // SessionTab ---------------------------------------------------------------- 126 // SessionTab ----------------------------------------------------------------
127 127
128 // SessionTab corresponds to a NavigationController. 128 // SessionTab corresponds to a NavigationController.
129 struct SessionTab { 129 struct SessionTab {
130 SessionTab(); 130 SessionTab();
131 virtual ~SessionTab(); 131 virtual ~SessionTab();
132 132
133 // Since the current_navigation_index can be larger than the index for number
134 // of navigations in the current sessions (chrome://newtab is not stored), we
135 // must perform bounds checking.
136 // Returns a normalized bounds-checked navigation_index.
137 int normalized_navigation_index() const {
138 return std::max(0, std::min(current_navigation_index,
139 static_cast<int>(navigations.size() - 1)));
140 }
141
133 // Unique id of the window. 142 // Unique id of the window.
134 SessionID window_id; 143 SessionID window_id;
135 144
136 // Unique if of the tab. 145 // Unique if of the tab.
137 SessionID tab_id; 146 SessionID tab_id;
138 147
139 // Visual index of the tab within its window. There may be gaps in these 148 // Visual index of the tab within its window. There may be gaps in these
140 // values. 149 // values.
141 // 150 //
142 // NOTE: this is really only useful for the SessionService during 151 // NOTE: this is really only useful for the SessionService during
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Is the window maximized, minimized, or normal? 229 // Is the window maximized, minimized, or normal?
221 ui::WindowShowState show_state; 230 ui::WindowShowState show_state;
222 231
223 std::string app_name; 232 std::string app_name;
224 233
225 private: 234 private:
226 DISALLOW_COPY_AND_ASSIGN(SessionWindow); 235 DISALLOW_COPY_AND_ASSIGN(SessionWindow);
227 }; 236 };
228 237
229 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_ 238 #endif // CHROME_BROWSER_SESSIONS_SESSION_TYPES_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698