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_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 // Enables the memory coordinator feature. This is for testing only. | |
| 13 CONTENT_EXPORT void EnableFeaturesForTesting(); | |
|
bashi
2016/11/03 23:31:18
I'm a bit uneasy to put these functions under cont
hajimehoshi
2016/11/07 10:54:32
I moved them to content/public/test/. There seems
| |
| 14 | |
| 15 // Sets up MemoryCoordinatorProxy with a regular MemoryCoordinator. This is for | |
| 16 // testing only. | |
| 17 CONTENT_EXPORT void SetUpMemoryCoordinatorProxyForTesting(); | |
|
hajimehoshi
2016/11/02 09:34:13
chrisha: Is there a better place to put such funct
| |
| 18 | |
| 12 // A delegate class which is used by the memory coordinator. | 19 // A delegate class which is used by the memory coordinator. |
| 13 class CONTENT_EXPORT MemoryCoordinatorDelegate { | 20 class CONTENT_EXPORT MemoryCoordinatorDelegate { |
| 14 public: | 21 public: |
| 15 virtual ~MemoryCoordinatorDelegate() {} | 22 virtual ~MemoryCoordinatorDelegate() {} |
| 16 | 23 |
| 17 // Returns true when a given backgrounded renderer process can be suspended. | 24 // Returns true when a given backgrounded renderer process can be suspended. |
| 18 virtual bool CanSuspendBackgroundedRenderer(int render_process_id) = 0; | 25 virtual bool CanSuspendBackgroundedRenderer(int render_process_id) = 0; |
| 19 }; | 26 }; |
| 20 | 27 |
| 21 } // namespace content | 28 } // namespace content |
| 22 | 29 |
| 23 #endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ | 30 #endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| OLD | NEW |