OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |
7 | 7 |
8 namespace extensions { | 8 namespace extensions { |
9 | 9 |
10 class ExtensionHost; | 10 class DeferredStartRenderHost; |
11 | 11 |
12 // An interface for a queue of ExtensionHosts waiting for initialization. | 12 // An interface for a queue of ExtensionHosts waiting for initialization. |
13 // This is used to implement different throttling strategies. | 13 // This is used to implement different throttling strategies. |
14 class ExtensionHostQueue { | 14 class ExtensionHostQueue { |
15 public: | 15 public: |
16 virtual ~ExtensionHostQueue() {} | 16 virtual ~ExtensionHostQueue() {} |
17 | 17 |
18 // Adds a host to the queue for RenderView creation. | 18 // Adds a host to the queue for RenderView creation. |
19 virtual void Add(ExtensionHost* host) = 0; | 19 virtual void Add(DeferredStartRenderHost* host) = 0; |
20 | 20 |
21 // Removes a host from the queue (for example, it may be deleted before | 21 // Removes a host from the queue (for example, it may be deleted before |
22 // having a chance to start). | 22 // having a chance to start). |
23 virtual void Remove(ExtensionHost* host) = 0; | 23 virtual void Remove(DeferredStartRenderHost* host) = 0; |
24 }; | 24 }; |
25 | 25 |
26 } // namespace extensions | 26 } // namespace extensions |
27 | 27 |
28 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ | 28 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_ |
OLD | NEW |