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

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

Issue 11085053: Improving window auto management between workspaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed as requested. Corner cases will have to be addressed as they show Created 8 years, 2 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 | Annotate | Revision Log
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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // browsers are running. 92 // browsers are running.
93 void MoveCurrentSessionToLastSession(); 93 void MoveCurrentSessionToLastSession();
94 94
95 // Associates a tab with a window. 95 // Associates a tab with a window.
96 void SetTabWindow(const SessionID& window_id, 96 void SetTabWindow(const SessionID& window_id,
97 const SessionID& tab_id); 97 const SessionID& tab_id);
98 98
99 // Sets the bounds of a window. 99 // Sets the bounds of a window.
100 void SetWindowBounds(const SessionID& window_id, 100 void SetWindowBounds(const SessionID& window_id,
101 const gfx::Rect& bounds, 101 const gfx::Rect& bounds,
102 ui::WindowShowState show_state); 102 ui::WindowShowState show_state,
103 bool user_has_changed_window_or_position);
103 104
104 // Sets the visual index of the tab in its parent window. 105 // Sets the visual index of the tab in its parent window.
105 void SetTabIndexInWindow(const SessionID& window_id, 106 void SetTabIndexInWindow(const SessionID& window_id,
106 const SessionID& tab_id, 107 const SessionID& tab_id,
107 int new_index); 108 int new_index);
108 109
109 // Sets the pinned state of the tab. 110 // Sets the pinned state of the tab.
110 void SetPinnedState(const SessionID& window_id, 111 void SetPinnedState(const SessionID& window_id,
111 const SessionID& tab_id, 112 const SessionID& tab_id,
112 bool is_pinned); 113 bool is_pinned);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 const std::string& extension_app_id); 244 const std::string& extension_app_id);
244 245
245 // Methods to create the various commands. It is up to the caller to delete 246 // Methods to create the various commands. It is up to the caller to delete
246 // the returned the SessionCommand* object. 247 // the returned the SessionCommand* object.
247 SessionCommand* CreateSetSelectedTabInWindow(const SessionID& window_id, 248 SessionCommand* CreateSetSelectedTabInWindow(const SessionID& window_id,
248 int index); 249 int index);
249 250
250 SessionCommand* CreateSetTabWindowCommand(const SessionID& window_id, 251 SessionCommand* CreateSetTabWindowCommand(const SessionID& window_id,
251 const SessionID& tab_id); 252 const SessionID& tab_id);
252 253
253 SessionCommand* CreateSetWindowBoundsCommand(const SessionID& window_id, 254 SessionCommand* CreateSetWindowBoundsCommand(
254 const gfx::Rect& bounds, 255 const SessionID& window_id,
255 ui::WindowShowState show_state); 256 const gfx::Rect& bounds,
257 ui::WindowShowState show_state,
258 bool user_has_changed_window_or_position);
256 259
257 SessionCommand* CreateSetTabIndexInWindowCommand(const SessionID& tab_id, 260 SessionCommand* CreateSetTabIndexInWindowCommand(const SessionID& tab_id,
258 int new_index); 261 int new_index);
259 262
260 SessionCommand* CreateTabClosedCommand(SessionID::id_type tab_id); 263 SessionCommand* CreateTabClosedCommand(SessionID::id_type tab_id);
261 264
262 SessionCommand* CreateWindowClosedCommand(SessionID::id_type tab_id); 265 SessionCommand* CreateWindowClosedCommand(SessionID::id_type tab_id);
263 266
264 SessionCommand* CreateSetSelectedNavigationIndexCommand( 267 SessionCommand* CreateSetSelectedNavigationIndexCommand(
265 const SessionID& tab_id, 268 const SessionID& tab_id,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 const base::TimeDelta save_delay_in_hrs_; 500 const base::TimeDelta save_delay_in_hrs_;
498 501
499 // For browser_tests, since we want to simulate the browser shutting down 502 // For browser_tests, since we want to simulate the browser shutting down
500 // without quitting. 503 // without quitting.
501 bool force_browser_not_alive_with_no_windows_; 504 bool force_browser_not_alive_with_no_windows_;
502 505
503 DISALLOW_COPY_AND_ASSIGN(SessionService); 506 DISALLOW_COPY_AND_ASSIGN(SessionService);
504 }; 507 };
505 508
506 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ 509 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698