| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WEB_CONTENTS_DATA_H_ | 5 #ifndef CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_WEB_CONTENTS_DATA_H_ |
| 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_ | 6 #define CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_WEB_CONTENTS_DATA_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/memory/tab_manager.h" | 10 #include "chrome/browser/resource_coordinator/tab_manager.h" |
| 11 #include "content/public/browser/web_contents_observer.h" | 11 #include "content/public/browser/web_contents_observer.h" |
| 12 #include "content/public/browser/web_contents_user_data.h" | 12 #include "content/public/browser/web_contents_user_data.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class TickClock; | 15 class TickClock; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class WebContents; | 19 class WebContents; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace memory { | 22 namespace resource_coordinator { |
| 23 | 23 |
| 24 // Internal class used by TabManager to record the needed data for | 24 // Internal class used by TabManager to record the needed data for |
| 25 // WebContentses. | 25 // WebContentses. |
| 26 class TabManager::WebContentsData | 26 class TabManager::WebContentsData |
| 27 : public content::WebContentsObserver, | 27 : public content::WebContentsObserver, |
| 28 public content::WebContentsUserData<TabManager::WebContentsData> { | 28 public content::WebContentsUserData<TabManager::WebContentsData> { |
| 29 public: | 29 public: |
| 30 explicit WebContentsData(content::WebContents* web_contents); | 30 explicit WebContentsData(content::WebContents* web_contents); |
| 31 ~WebContentsData() override; | 31 ~WebContentsData() override; |
| 32 | 32 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // The time to purge after the tab is backgrounded. | 141 // The time to purge after the tab is backgrounded. |
| 142 base::TimeDelta time_to_purge_; | 142 base::TimeDelta time_to_purge_; |
| 143 | 143 |
| 144 // True if the tab has been purged. | 144 // True if the tab has been purged. |
| 145 bool is_purged_; | 145 bool is_purged_; |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(WebContentsData); | 147 DISALLOW_COPY_AND_ASSIGN(WebContentsData); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace memory | 150 } // namespace resource_coordinator |
| 151 | 151 |
| 152 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_ | 152 #endif // CHROME_BROWSER_RESOURCE_COORDINATOR_TAB_MANAGER_WEB_CONTENTS_DATA_H_ |
| OLD | NEW |