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_RESTORE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 | 115 |
116 private: | 116 private: |
117 friend class SessionRestoreImpl; | 117 friend class SessionRestoreImpl; |
118 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, SingleSessionRestore); | 118 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, SingleSessionRestore); |
119 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, | 119 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, |
120 SequentialSessionRestores); | 120 SequentialSessionRestores); |
121 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, | 121 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, |
122 ConcurrentSessionRestores); | 122 ConcurrentSessionRestores); |
123 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, | 123 FRIEND_TEST_ALL_PREFIXES(SessionRestoreObserverTest, |
124 TabManagerShouldObserveSessionRestore); | 124 TabManagerShouldObserveSessionRestore); |
125 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
Bryan McQuade
2017/08/09 15:41:35
eek, it's slightly concerning to me that we need t
ducbui
2017/08/09 19:43:07
I will remove these because OnWillRestoreTab() is
| |
126 RestoreSingleForegroundTab); | |
127 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
128 RestoreMultipleForegroundTabs); | |
129 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
130 RestoreBackgroundTab); | |
131 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
132 HideTabBeforeFirstPaints); | |
133 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
134 SwitchInitialRestoredForegroundTab); | |
135 FRIEND_TEST_ALL_PREFIXES(SessionRestorePageLoadMetricsObserverTest, | |
136 MultipleSessionRestores); | |
125 | 137 |
126 // Session restore observer list. | 138 // Session restore observer list. |
127 using SessionRestoreObserverList = base::ObserverList<SessionRestoreObserver>; | 139 using SessionRestoreObserverList = base::ObserverList<SessionRestoreObserver>; |
128 | 140 |
129 SessionRestore(); | 141 SessionRestore(); |
130 | 142 |
131 // Accessor for |*on_session_restored_callbacks_|. Creates a new object the | 143 // Accessor for |*on_session_restored_callbacks_|. Creates a new object the |
132 // first time so that it always returns a valid object. | 144 // first time so that it always returns a valid object. |
133 static CallbackList* on_session_restored_callbacks() { | 145 static CallbackList* on_session_restored_callbacks() { |
134 if (!on_session_restored_callbacks_) | 146 if (!on_session_restored_callbacks_) |
(...skipping 23 matching lines...) Expand all Loading... | |
158 // Contains all registered observers for session restore events. | 170 // Contains all registered observers for session restore events. |
159 static SessionRestoreObserverList* observers_; | 171 static SessionRestoreObserverList* observers_; |
160 | 172 |
161 // Whether session restore started or not. | 173 // Whether session restore started or not. |
162 static bool session_restore_started_; | 174 static bool session_restore_started_; |
163 | 175 |
164 DISALLOW_COPY_AND_ASSIGN(SessionRestore); | 176 DISALLOW_COPY_AND_ASSIGN(SessionRestore); |
165 }; | 177 }; |
166 | 178 |
167 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 179 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
OLD | NEW |