| 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 // NOTE: Memory coordinator is under development and not fully working. |
| 18 // TODO(bashi): Add more explanations when we implement memory coordinator V0. |
| 19 |
| 17 class MemoryCoordinatorHandleImpl; | 20 class MemoryCoordinatorHandleImpl; |
| 18 | 21 |
| 19 // MemoryCoordinator is responsible for the whole memory management accross the | 22 // MemoryCoordinator is responsible for the whole memory management accross the |
| 20 // browser and child proceeses. It dispatches memory events to its clients and | 23 // browser and child proceeses. It dispatches memory events to its clients and |
| 21 // child processes based on its best knowledge of the memory usage. | 24 // child processes based on its best knowledge of the memory usage. |
| 22 class CONTENT_EXPORT MemoryCoordinator { | 25 class CONTENT_EXPORT MemoryCoordinator { |
| 23 public: | 26 public: |
| 24 ~MemoryCoordinator(); | 27 ~MemoryCoordinator(); |
| 25 | 28 |
| 26 // Singleton factory/accessor. | 29 // 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 | 85 // MemoryCoordinator and removed automatically when an underlying binding is |
| 83 // disconnected. | 86 // disconnected. |
| 84 ChildInfoMap children_; | 87 ChildInfoMap children_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator); | 89 DISALLOW_COPY_AND_ASSIGN(MemoryCoordinator); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 } // namespace content | 92 } // namespace content |
| 90 | 93 |
| 91 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ | 94 #endif // CONTENT_BROWSER_MEMORY_MEMORY_COORDINATOR_H_ |
| OLD | NEW |