| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_OBSERVER_H_ | |
| 7 | |
| 8 namespace content { | |
| 9 class WebContents; | |
| 10 } | |
| 11 | |
| 12 namespace memory { | |
| 13 | |
| 14 // Interface for objects that wish to be notified of changes in TabManager. | |
| 15 class TabManagerObserver { | |
| 16 public: | |
| 17 // Invoked when the Discarded state changes. | |
| 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. | |
| 20 virtual void OnDiscardedStateChange(content::WebContents* contents, | |
| 21 bool is_discarded); | |
| 22 | |
| 23 // Invoked when the auto-discardable state changes. | |
| 24 virtual void OnAutoDiscardableStateChange(content::WebContents* contents, | |
| 25 bool is_auto_discardable); | |
| 26 | |
| 27 protected: | |
| 28 virtual ~TabManagerObserver(); | |
| 29 }; | |
| 30 | |
| 31 } // namespace memory | |
| 32 | |
| 33 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_OBSERVER_H_ | |
| OLD | NEW |