Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chrome/browser/memory/tab_manager_web_contents_data.h

Issue 2470073002: Revert of Add Resume logic of Purge+Suspend to TabManager. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_
6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_ 6 #define CHROME_BROWSER_MEMORY_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/memory/tab_manager.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // i.e. the last purge-and-suspend modified time. 83 // i.e. the last purge-and-suspend modified time.
84 // TODO(tasak): remove this after PurgeAndSuspend code is moved into 84 // TODO(tasak): remove this after PurgeAndSuspend code is moved into
85 // MemoryCoordinator. 85 // MemoryCoordinator.
86 void SetPurgeAndSuspendState(TabManager::PurgeAndSuspendState state); 86 void SetPurgeAndSuspendState(TabManager::PurgeAndSuspendState state);
87 87
88 // Returns the last purge-and-suspend modified time. 88 // Returns the last purge-and-suspend modified time.
89 // TODO(tasak): remove this after PurgeAndSuspend code is moved into 89 // TODO(tasak): remove this after PurgeAndSuspend code is moved into
90 // MemoryCoordinator. 90 // MemoryCoordinator.
91 base::TimeTicks LastPurgeAndSuspendModifiedTime() const; 91 base::TimeTicks LastPurgeAndSuspendModifiedTime() const;
92 92
93 // Sets the timestamp of the last modified time the purge-and-suspend state
94 // of the tab was changed for testing.
95 void SetLastPurgeAndSuspendModifiedTimeForTesting(base::TimeTicks timestamp);
96
97 // Returns the current state of purge-and-suspend. 93 // Returns the current state of purge-and-suspend.
98 // TODO(tasak): remove this after PurgeAndSuspend code is moved into 94 // TODO(tasak): remove this after PurgeAndSuspend code is moved into
99 // MemoryCoordinator. 95 // MemoryCoordinator.
100 TabManager::PurgeAndSuspendState GetPurgeAndSuspendState() const; 96 TabManager::PurgeAndSuspendState GetPurgeAndSuspendState() const;
101 97
102 private: 98 private:
103 // Needed to access tab_data_. 99 // Needed to access tab_data_.
104 FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, CopyState); 100 FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, CopyState);
105 101
106 struct Data { 102 struct Data {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 142
147 // The current state of purge-and-suspend. 143 // The current state of purge-and-suspend.
148 PurgeAndSuspendState purge_and_suspend_state_; 144 PurgeAndSuspendState purge_and_suspend_state_;
149 145
150 DISALLOW_COPY_AND_ASSIGN(WebContentsData); 146 DISALLOW_COPY_AND_ASSIGN(WebContentsData);
151 }; 147 };
152 148
153 } // namespace memory 149 } // namespace memory
154 150
155 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_ 151 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_WEB_CONTENTS_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/memory/tab_manager_unittest.cc ('k') | chrome/browser/memory/tab_manager_web_contents_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698