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

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

Issue 1978343002: [TabManager] Start function refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [TabManager] refactoring. Created 4 years, 7 months 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 (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_MEMORY_TAB_MANAGER_H_
6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // for more details. 236 // for more details.
237 base::TimeTicks NowTicks() const; 237 base::TimeTicks NowTicks() const;
238 238
239 // Dispatches a memory pressure message to a single child process, and 239 // Dispatches a memory pressure message to a single child process, and
240 // schedules another call to itself as long as memory pressure continues. 240 // schedules another call to itself as long as memory pressure continues.
241 void DoChildProcessDispatch(); 241 void DoChildProcessDispatch();
242 242
243 // Implementation of DiscardTab. 243 // Implementation of DiscardTab.
244 bool DiscardTabImpl(); 244 bool DiscardTabImpl();
245 245
246 // "Return true if tabs can be discarded more than once.
Georges Khalil 2016/05/17 13:49:07 nit: Remove " and return -> returns.
Anderson Silva 2016/05/17 15:12:02 Acknowledged.
247 bool AllowMultipleDiscards();
248
246 // Timer to periodically update the stats of the renderers. 249 // Timer to periodically update the stats of the renderers.
247 base::RepeatingTimer update_timer_; 250 base::RepeatingTimer update_timer_;
248 251
249 // Timer to periodically report whether a tab has been discarded since the 252 // Timer to periodically report whether a tab has been discarded since the
250 // last time the timer has fired. 253 // last time the timer has fired.
251 base::RepeatingTimer recent_tab_discard_timer_; 254 base::RepeatingTimer recent_tab_discard_timer_;
252 255
253 // A listener to global memory pressure events. 256 // A listener to global memory pressure events.
254 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_; 257 std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
255 258
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 329
327 // Weak pointer factory used for posting delayed tasks to task_runner_. 330 // Weak pointer factory used for posting delayed tasks to task_runner_.
328 base::WeakPtrFactory<TabManager> weak_ptr_factory_; 331 base::WeakPtrFactory<TabManager> weak_ptr_factory_;
329 332
330 DISALLOW_COPY_AND_ASSIGN(TabManager); 333 DISALLOW_COPY_AND_ASSIGN(TabManager);
331 }; 334 };
332 335
333 } // namespace memory 336 } // namespace memory
334 337
335 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ 338 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager.cc » ('j') | chrome/browser/memory/tab_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698