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

Side by Side Diff: components/sessions/core/tab_restore_service.h

Issue 2868983003: Ensure History > Recent Tabs restore preserves window disposition. (Closed)
Patch Set: Remove NOTREACHED(). Created 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_
6 #define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_ 6 #define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "components/keyed_service/core/keyed_service.h" 14 #include "components/keyed_service/core/keyed_service.h"
15 #include "components/sessions/core/serialized_navigation_entry.h" 15 #include "components/sessions/core/serialized_navigation_entry.h"
16 #include "components/sessions/core/session_id.h" 16 #include "components/sessions/core/session_id.h"
17 #include "components/sessions/core/session_types.h" 17 #include "components/sessions/core/session_types.h"
18 #include "components/sessions/core/sessions_export.h" 18 #include "components/sessions/core/sessions_export.h"
19 #include "ui/base/ui_base_types.h"
19 #include "ui/base/window_open_disposition.h" 20 #include "ui/base/window_open_disposition.h"
21 #include "ui/gfx/geometry/rect.h"
20 22
21 namespace sessions { 23 namespace sessions {
22 24
23 class LiveTab; 25 class LiveTab;
24 class PlatformSpecificTabData; 26 class PlatformSpecificTabData;
25 class LiveTabContext; 27 class LiveTabContext;
26 class TabRestoreServiceObserver; 28 class TabRestoreServiceObserver;
27 29
28 // TabRestoreService is responsible for maintaining the most recently closed 30 // TabRestoreService is responsible for maintaining the most recently closed
29 // tabs and windows. When a tab is closed 31 // tabs and windows. When a tab is closed
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 size_t EstimateMemoryUsage() const override; 128 size_t EstimateMemoryUsage() const override;
127 129
128 // The tabs that comprised the window, in order. 130 // The tabs that comprised the window, in order.
129 std::vector<std::unique_ptr<Tab>> tabs; 131 std::vector<std::unique_ptr<Tab>> tabs;
130 132
131 // Index of the selected tab. 133 // Index of the selected tab.
132 int selected_tab_index = -1; 134 int selected_tab_index = -1;
133 135
134 // If an application window, the name of the app. 136 // If an application window, the name of the app.
135 std::string app_name; 137 std::string app_name;
138
139 // Where and how the window is displayed.
140 gfx::Rect bounds;
141 ui::WindowShowState show_state;
142 std::string workspace;
136 }; 143 };
137 144
138 typedef std::list<std::unique_ptr<Entry>> Entries; 145 typedef std::list<std::unique_ptr<Entry>> Entries;
139 146
140 ~TabRestoreService() override; 147 ~TabRestoreService() override;
141 148
142 // Adds/removes an observer. TabRestoreService does not take ownership of 149 // Adds/removes an observer. TabRestoreService does not take ownership of
143 // the observer. 150 // the observer.
144 virtual void AddObserver(TabRestoreServiceObserver* observer) = 0; 151 virtual void AddObserver(TabRestoreServiceObserver* observer) = 0;
145 virtual void RemoveObserver(TabRestoreServiceObserver* observer) = 0; 152 virtual void RemoveObserver(TabRestoreServiceObserver* observer) = 0;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // A class that is used to associate platform-specific data with 210 // A class that is used to associate platform-specific data with
204 // TabRestoreService::Tab. See LiveTab::GetPlatformSpecificTabData(). 211 // TabRestoreService::Tab. See LiveTab::GetPlatformSpecificTabData().
205 class SESSIONS_EXPORT PlatformSpecificTabData { 212 class SESSIONS_EXPORT PlatformSpecificTabData {
206 public: 213 public:
207 virtual ~PlatformSpecificTabData(); 214 virtual ~PlatformSpecificTabData();
208 }; 215 };
209 216
210 } // namespace sessions 217 } // namespace sessions
211 218
212 #endif // COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_ 219 #endif // COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_H_
OLDNEW
« no previous file with comments | « components/sessions/core/persistent_tab_restore_service.cc ('k') | components/sessions/core/tab_restore_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698