OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_OBSERVER_H_ |
6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_OBSERVER_H_ | 6 #define CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_OBSERVER_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 class WebContents; | 9 class WebContents; |
10 } | 10 } |
11 | 11 |
12 namespace memory { | 12 namespace resource_coordinator { |
13 | 13 |
14 // Interface for objects that wish to be notified of changes in TabManager. | 14 // Interface for objects that wish to be notified of changes in TabManager. |
15 class TabManagerObserver { | 15 class TabManagerObserver { |
16 public: | 16 public: |
17 // Invoked when the Discarded state changes. | 17 // Invoked when the Discarded state changes. |
18 // Sends the WebContents of the tab that had the discarded property changed | 18 // Sends the WebContents of the tab that had the discarded property changed |
19 // and the current state to let observers know if it is discarderd or not. | 19 // and the current state to let observers know if it is discarderd or not. |
20 virtual void OnDiscardedStateChange(content::WebContents* contents, | 20 virtual void OnDiscardedStateChange(content::WebContents* contents, |
21 bool is_discarded); | 21 bool is_discarded); |
22 | 22 |
23 // Invoked when the auto-discardable state changes. | 23 // Invoked when the auto-discardable state changes. |
24 virtual void OnAutoDiscardableStateChange(content::WebContents* contents, | 24 virtual void OnAutoDiscardableStateChange(content::WebContents* contents, |
25 bool is_auto_discardable); | 25 bool is_auto_discardable); |
26 | 26 |
27 protected: | 27 protected: |
28 virtual ~TabManagerObserver(); | 28 virtual ~TabManagerObserver(); |
29 }; | 29 }; |
30 | 30 |
31 } // namespace memory | 31 } // namespace resource_coordinator |
32 | 32 |
33 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_OBSERVER_H_ | 33 #endif // CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_OBSERVER_H_ |
OLD | NEW |