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

Side by Side Diff: content/common/child_memory_coordinator.mojom

Issue 2479673002: Expose MemoryCoordinator's global budget information. (Closed)
Patch Set: Small cleanup. 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 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 module content.mojom; 5 module content.mojom;
6 6
7 // See base/memory/memory_coordinator_client.h for the definitions of these 7 // See base/memory/memory_coordinator_client.h for the definitions of these
8 // states. 8 // states.
9 enum MemoryState { 9 enum MemoryState {
10 UNKNOWN = -1, 10 UNKNOWN = -1,
11 NORMAL = 0, 11 NORMAL = 0,
12 THROTTLED = 1, 12 THROTTLED = 1,
13 SUSPENDED = 2, 13 SUSPENDED = 2,
14 }; 14 };
15 15
16 // ChildMemoryCoordinator lives in a child process and receives memory events 16 // ChildMemoryCoordinator lives in a child process and receives memory events
17 // dispatched by the central memory coordinator which lives in the browser 17 // dispatched by the central memory coordinator which lives in the browser
18 // process. 18 // process.
19 interface ChildMemoryCoordinator { 19 interface ChildMemoryCoordinator {
20 // Called when the central memory coodinator changes the state for child 20 // Called when the central memory coodinator changes the state for child
21 // processes. 21 // processes.
22 OnStateChange(MemoryState state); 22 OnStateChange(MemoryState state);
23
24 // Called by the central memory coordinator to communicate budget changes
25 // to the child process. This communicates the global budget which is
26 // usable in aggregate by all Chrome processes. This indicates how many MB
27 // of memory are remaining for Chrome processes to use before the memory
28 // coordinator will take efforts to reclaim memory. A negative amount
29 // indicates that the coordinator is actively trying to reclaim that much
30 // memory.
31 SetRemainingGlobalBudget(int64 remaining_global_budget_mb);
23 }; 32 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698