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

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

Issue 2685263002: Add PurgeMemory() method for ChildMemoryCoordinator.mojom (Closed)
Patch Set: comment Created 3 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
« no previous file with comments | « content/child/memory/child_memory_coordinator_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Requests the child process to purge memory (e.g. by dropping caches that
25 // can be easily rebuilt).
26 PurgeMemory();
23 }; 27 };
OLDNEW
« no previous file with comments | « content/child/memory/child_memory_coordinator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698