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_RESOURCE_COORDINATOR_TAB_MANAGER_H_ |
6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 6 #define CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/memory_pressure_listener.h" | 19 #include "base/memory/memory_pressure_listener.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
22 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
23 #include "base/timer/timer.h" | 23 #include "base/timer/timer.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "chrome/browser/memory/tab_manager_observer.h" | 25 #include "chrome/browser/resource_coordinator/tab_manager_observer.h" |
26 #include "chrome/browser/memory/tab_stats.h" | 26 #include "chrome/browser/resource_coordinator/tab_stats.h" |
27 #include "chrome/browser/ui/browser_tab_strip_tracker.h" | 27 #include "chrome/browser/ui/browser_tab_strip_tracker.h" |
28 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 28 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
29 | 29 |
30 class BrowserList; | 30 class BrowserList; |
31 class GURL; | 31 class GURL; |
32 class TabStripModel; | 32 class TabStripModel; |
33 | 33 |
34 namespace base { | 34 namespace base { |
35 class TickClock; | 35 class TickClock; |
36 } | 36 } |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 class WebContents; | 39 class WebContents; |
40 } | 40 } |
41 | 41 |
42 namespace memory { | 42 namespace resource_coordinator { |
43 | 43 |
44 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
45 class TabManagerDelegate; | 45 class TabManagerDelegate; |
46 #endif | 46 #endif |
47 | 47 |
48 // The TabManager periodically updates (see | 48 // The TabManager periodically updates (see |
49 // |kAdjustmentIntervalSeconds| in the source) the status of renderers | 49 // |kAdjustmentIntervalSeconds| in the source) the status of renderers |
50 // which are then used by the algorithm embedded here for priority in being | 50 // which are then used by the algorithm embedded here for priority in being |
51 // killed upon OOM conditions. | 51 // killed upon OOM conditions. |
52 // | 52 // |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 // List of observers that will receive notifications on state changes. | 365 // List of observers that will receive notifications on state changes. |
366 base::ObserverList<TabManagerObserver> observers_; | 366 base::ObserverList<TabManagerObserver> observers_; |
367 | 367 |
368 // Weak pointer factory used for posting delayed tasks. | 368 // Weak pointer factory used for posting delayed tasks. |
369 base::WeakPtrFactory<TabManager> weak_ptr_factory_; | 369 base::WeakPtrFactory<TabManager> weak_ptr_factory_; |
370 | 370 |
371 DISALLOW_COPY_AND_ASSIGN(TabManager); | 371 DISALLOW_COPY_AND_ASSIGN(TabManager); |
372 }; | 372 }; |
373 | 373 |
374 } // namespace memory | 374 } // namespace resource_coordinator |
375 | 375 |
376 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ | 376 #endif // CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_H_ |
OLD | NEW |