Chromium Code Reviews| Index: content/public/browser/memory_coordinator_delegate.h |
| diff --git a/content/public/browser/memory_coordinator_delegate.h b/content/public/browser/memory_coordinator_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cf08697d96d5cde0c6a6e9d8253ae3892a393203 |
| --- /dev/null |
| +++ b/content/public/browser/memory_coordinator_delegate.h |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| +#define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| + |
| +#include "base/memory/weak_ptr.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +// A delegate class which is used by the memory coordinator. |
| +class CONTENT_EXPORT MemoryCoordinatorDelegate { |
| + public: |
| + static void Set(const base::WeakPtr<MemoryCoordinatorDelegate>& delegate); |
| + |
| + // Returns true when a given render process can be suspended. |
|
haraken
2016/10/07 06:38:19
renderer
bashi
2016/10/07 07:13:37
Done.
|
| + virtual bool CanSuspendRenderer(int render_process_id) = 0; |
| + |
| + protected: |
| + virtual ~MemoryCoordinatorDelegate() {} |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |