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

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

Issue 2763933002: memory coordinator: Purge memory under memory pressure (Closed)
Patch Set: Use int64_t Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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_CHROME_MEMORY_COORDINATOR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
6 #define CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_ 6 #define CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/public/browser/memory_coordinator_delegate.h" 9 #include "content/public/browser/memory_coordinator_delegate.h"
10 10
11 namespace memory { 11 namespace memory {
12 12
13 // A MemoryCoordinatorDelegate which uses TabManager internally. 13 // A MemoryCoordinatorDelegate which uses TabManager internally.
14 class ChromeMemoryCoordinatorDelegate 14 class ChromeMemoryCoordinatorDelegate
15 : public content::MemoryCoordinatorDelegate { 15 : public content::MemoryCoordinatorDelegate {
16 public: 16 public:
17 static std::unique_ptr<content::MemoryCoordinatorDelegate> Create(); 17 static std::unique_ptr<content::MemoryCoordinatorDelegate> Create();
18 18
19 ~ChromeMemoryCoordinatorDelegate() override; 19 ~ChromeMemoryCoordinatorDelegate() override;
20 20
21 // MemoryCoordinatorDelegate implementation. 21 // MemoryCoordinatorDelegate implementation.
22 bool CanSuspendBackgroundedRenderer(int render_process_id) override; 22 bool CanSuspendBackgroundedRenderer(int render_process_id) override;
23 void DiscardTab() override; 23 bool DiscardTab() override;
24 24
25 private: 25 private:
26 ChromeMemoryCoordinatorDelegate(); 26 ChromeMemoryCoordinatorDelegate();
27 27
28 DISALLOW_COPY_AND_ASSIGN(ChromeMemoryCoordinatorDelegate); 28 DISALLOW_COPY_AND_ASSIGN(ChromeMemoryCoordinatorDelegate);
29 }; 29 };
30 30
31 } // namespace memory 31 } // namespace memory
32 32
33 #endif // CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_ 33 #endif // CHROME_BROWSER_MEMORY_CHROME_MEMORY_COORDINATOR_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/memory/chrome_memory_coordinator_delegate.cc » ('j') | chrome/browser/memory/tab_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698