| 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_MEMORY_TAB_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // used for statistics normalized by usage. | 359 // used for statistics normalized by usage. |
| 360 bool recent_tab_discard_; | 360 bool recent_tab_discard_; |
| 361 | 361 |
| 362 // Whether a tab can only ever discarded once. | 362 // Whether a tab can only ever discarded once. |
| 363 bool discard_once_; | 363 bool discard_once_; |
| 364 | 364 |
| 365 // This allows protecting tabs for a certain amount of time after being | 365 // This allows protecting tabs for a certain amount of time after being |
| 366 // backgrounded. | 366 // backgrounded. |
| 367 base::TimeDelta minimum_protection_time_; | 367 base::TimeDelta minimum_protection_time_; |
| 368 | 368 |
| 369 // A backgrounded renderer will be suspended when this time passes. |
| 370 base::TimeDelta time_to_first_suspension_; |
| 371 |
| 369 #if defined(OS_CHROMEOS) | 372 #if defined(OS_CHROMEOS) |
| 370 std::unique_ptr<TabManagerDelegate> delegate_; | 373 std::unique_ptr<TabManagerDelegate> delegate_; |
| 371 #endif | 374 #endif |
| 372 | 375 |
| 373 // Responsible for automatically registering this class as an observer of all | 376 // Responsible for automatically registering this class as an observer of all |
| 374 // TabStripModels. Automatically tracks browsers as they come and go. | 377 // TabStripModels. Automatically tracks browsers as they come and go. |
| 375 BrowserTabStripTracker browser_tab_strip_tracker_; | 378 BrowserTabStripTracker browser_tab_strip_tracker_; |
| 376 | 379 |
| 377 // Pointer to a test clock. If this is set, NowTicks() returns the value of | 380 // Pointer to a test clock. If this is set, NowTicks() returns the value of |
| 378 // this test clock. Otherwise it returns the system clock's value. | 381 // this test clock. Otherwise it returns the system clock's value. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 420 |
| 418 // Weak pointer factory used for posting delayed tasks to task_runner_. | 421 // Weak pointer factory used for posting delayed tasks to task_runner_. |
| 419 base::WeakPtrFactory<TabManager> weak_ptr_factory_; | 422 base::WeakPtrFactory<TabManager> weak_ptr_factory_; |
| 420 | 423 |
| 421 DISALLOW_COPY_AND_ASSIGN(TabManager); | 424 DISALLOW_COPY_AND_ASSIGN(TabManager); |
| 422 }; | 425 }; |
| 423 | 426 |
| 424 } // namespace memory | 427 } // namespace memory |
| 425 | 428 |
| 426 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 429 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ |
| OLD | NEW |