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

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

Issue 10850010: Make session restore understand that tabs have multiple SessionStorageNamespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, with test robustified. 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 | 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_TAB_RESTORE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map>
9 #include <set> 10 #include <set>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
13 #include "base/observer_list.h" 14 #include "base/observer_list.h"
14 #include "base/time.h" 15 #include "base/time.h"
15 #include "chrome/browser/sessions/base_session_service.h" 16 #include "chrome/browser/sessions/base_session_service.h"
16 #include "chrome/browser/sessions/session_id.h" 17 #include "chrome/browser/sessions/session_id.h"
17 #include "chrome/browser/sessions/session_types.h" 18 #include "chrome/browser/sessions/session_types.h"
19 #include "content/public/browser/navigation_controller.h"
18 #include "content/public/browser/session_storage_namespace.h" 20 #include "content/public/browser/session_storage_namespace.h"
19 #include "webkit/glue/window_open_disposition.h" 21 #include "webkit/glue/window_open_disposition.h"
20 22
21 class Profile; 23 class Profile;
22 class TabRestoreServiceDelegate; 24 class TabRestoreServiceDelegate;
23 class TabRestoreServiceObserver; 25 class TabRestoreServiceObserver;
24 struct SessionWindow; 26 struct SessionWindow;
25 27
26 namespace content { 28 namespace content {
27 class NavigationController; 29 class NavigationController;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 97
96 // Index within the tab strip. May be -1 for an unknown index. 98 // Index within the tab strip. May be -1 for an unknown index.
97 int tabstrip_index; 99 int tabstrip_index;
98 100
99 // True if the tab was pinned. 101 // True if the tab was pinned.
100 bool pinned; 102 bool pinned;
101 103
102 // If non-empty gives the id of the extension for the tab. 104 // If non-empty gives the id of the extension for the tab.
103 std::string extension_app_id; 105 std::string extension_app_id;
104 106
105 // The associated session storage namespace (if any). 107 // The associated session storage namespaces (if any).
106 scoped_refptr<content::SessionStorageNamespace> session_storage_namespace; 108 content::SessionStorageNamespaceMap session_storage_namespace_map;
107 109
108 // The user agent override used for the tab's navigations (if applicable). 110 // The user agent override used for the tab's navigations (if applicable).
109 std::string user_agent_override; 111 std::string user_agent_override;
110 }; 112 };
111 113
112 // Represents a previously open window. 114 // Represents a previously open window.
113 struct Window : public Entry { 115 struct Window : public Entry {
114 Window(); 116 Window();
115 virtual ~Window(); 117 virtual ~Window();
116 118
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // loading LoadStateChanged is invoked, which adds these entries to 381 // loading LoadStateChanged is invoked, which adds these entries to
380 // entries_. 382 // entries_.
381 std::vector<Entry*> staging_entries_; 383 std::vector<Entry*> staging_entries_;
382 384
383 TimeFactory* time_factory_; 385 TimeFactory* time_factory_;
384 386
385 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); 387 DISALLOW_COPY_AND_ASSIGN(TabRestoreService);
386 }; 388 };
387 389
388 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ 390 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698