Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ | 5 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ |
| 6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ | 6 #define CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/memory_coordinator_client_registry.h" | 8 #include "base/memory/memory_coordinator_client_registry.h" |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/memory_coordinator.mojom.h" | 12 #include "content/common/memory_coordinator.mojom.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 13 #include "mojo/public/cpp/bindings/binding.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // OVERVIEW: | |
| 18 // Memory coordinator is a content-aware and stateful replacement for | |
|
dcheng
2016/09/26 04:55:07
I'm not entirely sure what content-aware means.
bashi
2016/09/26 05:57:22
I borrowed this sentence from the design doc. It s
| |
| 19 // MemoryPressureMonitor/MemoryPressureListener. The memory coordinator | |
| 20 // system consists of several parts and some of them are located in base/ to | |
|
dcheng
2016/09/26 04:55:07
I think it's OK to leave out the second sentence.
bashi
2016/09/26 05:57:22
Yes, we are planning to remove MemoryPressureMonit
| |
| 21 // work around dependency issues. | |
| 22 // | |
| 23 // NOTE: Memory coordinator is under development and not fully working. | |
| 24 // TODO(bashi): Add more explanations when we implement memory coordinator V0. | |
| 25 | |
| 17 class MemoryCoordinatorHandleImpl; | 26 class MemoryCoordinatorHandleImpl; |
| 18 | 27 |
| 19 // MemoryCoordinator is responsible for the whole memory management accross the | 28 // MemoryCoordinator is responsible for the whole memory management accross the |
| 20 // browser and child proceeses. It dispatches memory events to its clients and | 29 // browser and child proceeses. It dispatches memory events to its clients and |
| 21 // child processes based on its best knowledge of the memory usage. | 30 // child processes based on its best knowledge of the memory usage. |
| 22 class CONTENT_EXPORT MemoryCoordinator { | 31 class CONTENT_EXPORT MemoryCoordinator { |
| 23 public: | 32 public: |
| 24 ~MemoryCoordinator(); | 33 ~MemoryCoordinator(); |
| 25 | 34 |
| 26 // Singleton factory/accessor. | 35 // Singleton factory/accessor. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 // MemoryCoordinator and removed automatically when an underlying binding is | 91 // MemoryCoordinator and removed automatically when an underlying binding is |
| 83 // disconnected. | 92 // disconnected. |
| 84 ChildInfoMap children_; | 93 ChildInfoMap children_; |
| 85 | 94 |
| 86 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator); | 95 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator); |
| 87 }; | 96 }; |
| 88 | 97 |
| 89 } // namespace content | 98 } // namespace content |
| 90 | 99 |
| 91 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ | 100 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ |
| OLD | NEW |