blob: 420800bf240783dbd6b734015e0ca4194411d6d3 [file] [log] [blame]
kalmanfcece452015-02-18 18:20:421// 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
8namespace extensions {
9
yozd61dfe192015-02-21 01:30:3710class DeferredStartRenderHost;
kalmanfcece452015-02-18 18:20:4211
12// An interface for a queue of ExtensionHosts waiting for initialization.
13// This is used to implement different throttling strategies.
14class ExtensionHostQueue {
15 public:
16 virtual ~ExtensionHostQueue() {}
17
18 // Adds a host to the queue for RenderView creation.
yozd61dfe192015-02-21 01:30:3719 virtual void Add(DeferredStartRenderHost* host) = 0;
kalmanfcece452015-02-18 18:20:4220
21 // Removes a host from the queue (for example, it may be deleted before
22 // having a chance to start).
yozd61dfe192015-02-21 01:30:3723 virtual void Remove(DeferredStartRenderHost* host) = 0;
kalmanfcece452015-02-18 18:20:4224};
25
26} // namespace extensions
27
28#endif // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_