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

Side by Side Diff: components/memory_coordinator/public/interfaces/child_memory_coordinator.mojom

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 5 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 module memory_coordinator.mojom; 5 module memory_coordinator.mojom;
6 6
7 enum MemoryState { 7 enum MemoryState {
8 UNKNOWN = -1, 8 UNKNOWN = -1,
9 NORMAL = 0, 9 NORMAL = 0,
10 THROTTLED = 1, 10 THROTTLED = 1,
11 // TODO(bashi): Define SUSPENDED when we need it. 11 // TODO(bashi): Define SUSPENDED when we need it.
12 // SUSPENDED = 2, 12 // SUSPENDED = 2,
13 }; 13 };
14 14
15 // ChildMemoryCoordinator lives in a child process and receives memory events 15 // ChildMemoryCoordinator lives in a child process and receives memory events
16 // dispatched by the central memory coordinator which lives in the browser 16 // dispatched by the central memory coordinator which lives in the browser
17 // process. 17 // process.
18 interface ChildMemoryCoordinator { 18 interface ChildMemoryCoordinator {
19 // Called when the central memory coodinator changes the state for child 19 // Called when the central memory coodinator changes the state for child
20 // processes. 20 // processes.
21 OnStateChange(MemoryState state); 21 OnStateChange(MemoryState state);
22
23 // Returns the latest memory state.
24 GetLastState() => (MemoryState state);
haraken 2016/06/27 02:17:07 GetLastState => GetCurrentState ?
bashi 2016/06/27 03:49:29 Done.
22 }; 25 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698