kalman | fcece45 | 2015-02-18 18:20:42 | [diff] [blame] | 1 | // Copyright 2015 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 EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |
| 6 | #define EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |
| 7 | |
| 8 | namespace extensions { |
| 9 | |
yoz | d61dfe19 | 2015-02-21 01:30:37 | [diff] [blame^] | 10 | class DeferredStartRenderHost; |
kalman | fcece45 | 2015-02-18 18:20:42 | [diff] [blame] | 11 | |
| 12 | // An interface for a queue of ExtensionHosts waiting for initialization. |
| 13 | // This is used to implement different throttling strategies. |
| 14 | class ExtensionHostQueue { |
| 15 | public: |
| 16 | virtual ~ExtensionHostQueue() {} |
| 17 | |
| 18 | // Adds a host to the queue for RenderView creation. |
yoz | d61dfe19 | 2015-02-21 01:30:37 | [diff] [blame^] | 19 | virtual void Add(DeferredStartRenderHost* host) = 0; |
kalman | fcece45 | 2015-02-18 18:20:42 | [diff] [blame] | 20 | |
| 21 | // Removes a host from the queue (for example, it may be deleted before |
| 22 | // having a chance to start). |
yoz | d61dfe19 | 2015-02-21 01:30:37 | [diff] [blame^] | 23 | virtual void Remove(DeferredStartRenderHost* host) = 0; |
kalman | fcece45 | 2015-02-18 18:20:42 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | } // namespace extensions |
| 27 | |
| 28 | #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |