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

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

Issue 1641813002: Provide renderers with memory pressure signals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@contentapi
Patch Set: Address nit. Created 4 years, 10 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
(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 // Facade around the singleton MemoryPressureControllerImpl class defined in
Charlie Reis 2016/01/29 19:46:56 We probably shouldn't introduce a public class in
chrisha 2016/01/29 21:12:12 Done.
17 // content/browser/memory/memory_pressure_controller_impl.h. See that header for
18 // more details. These are exposed so that chrome/browser can interact with the
Charlie Reis 2016/01/29 19:46:56 Let's say "content embedders" rather than chrome/b
chrisha 2016/01/29 21:12:12 Done.
19 // content memory pressure subsystem. These may be called from any thread.
20 class CONTENT_EXPORT MemoryPressureController {
21 public:
22 static void SendPressureNotification(
Charlie Reis 2016/01/29 19:46:56 Let's copy the comments on these functions here, s
chrisha 2016/01/29 21:12:12 Done.
23 const BrowserChildProcessHost* child_process_host,
24 base::MemoryPressureListener::MemoryPressureLevel level);
25 static void SendPressureNotification(
26 const RenderProcessHost* render_process_host,
27 base::MemoryPressureListener::MemoryPressureLevel level);
28 private:
Charlie Reis 2016/01/29 19:46:56 nit: Add blank line above.
chrisha 2016/01/29 21:12:13 Done.
29 DISALLOW_COPY_AND_ASSIGN(MemoryPressureController);
30 };
31
32 } // namespace content
33
34 #endif // CONTENT_PUBLIC_BROWSER_MEMORY_MEMORY_PRESSURE_CONTROLLER_H_
Charlie Reis 2016/01/29 19:46:56 Looks like you have an extra MEMORY_ here.
chrisha 2016/01/29 21:12:12 Indeed I do. Removed.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698