OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // A delegate class which is used by the memory coordinator. |
| 14 class CONTENT_EXPORT MemoryCoordinatorDelegate { |
| 15 public: |
| 16 static void Set(const base::WeakPtr<MemoryCoordinatorDelegate>& delegate); |
| 17 |
| 18 // Returns true when a given renderer process can be suspended. |
| 19 virtual bool CanSuspendRenderer(int render_process_id) = 0; |
| 20 |
| 21 protected: |
| 22 virtual ~MemoryCoordinatorDelegate() {} |
| 23 }; |
| 24 |
| 25 } // namespace content |
| 26 |
| 27 #endif // CONTENT_PUBLIC_BROWSER_MEMORY_COORDINATOR_DELEGATE_H_ |
OLD | NEW |