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

Side by Side Diff: content/public/browser/memory_pressure_controller.h

Issue 2882513004: Remove renderer notifications of memory pressure. (Closed)
Patch Set: Merge Created 3 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
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/memory_pressure_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_MEMORY_PRESSURE_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_MEMORY_PRESSURE_CONTROLLER_H_
7
8 #include "base/memory/memory_pressure_listener.h"
9 #include "content/common/content_export.h"
10
11 namespace content {
12
13 class BrowserChildProcessHost;
14 class RenderProcessHost;
15
16 // Allows content embedders to forward memory pressure events from the main
17 // browser process to children processes. For more details see
18 // content/browser/memory/memory_pressure_controller_impl.h.
19 class CONTENT_EXPORT MemoryPressureController {
20 public:
21
22 // Sends a memory pressure notification to the specified browser child process
23 // via its attached MemoryMessageFilter. May be called on any thread.
24 static void SendPressureNotification(
25 const BrowserChildProcessHost* child_process_host,
26 base::MemoryPressureListener::MemoryPressureLevel level);
27
28 // Sends a memory pressure notification to the specified renderer process via
29 // its attached MemoryMessageFilter. May be called on any thread.
30 static void SendPressureNotification(
31 const RenderProcessHost* render_process_host,
32 base::MemoryPressureListener::MemoryPressureLevel level);
33
34 private:
35 DISALLOW_COPY_AND_ASSIGN(MemoryPressureController);
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_PUBLIC_BROWSER_MEMORY_PRESSURE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/memory_pressure_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698