blob: 4c9cb5bfa000432ea7adaee1e21402b2f9e33e5b [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
10class ExtensionHost;
11
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.
19 virtual void Add(ExtensionHost* host) = 0;
20
21 // Removes a host from the queue (for example, it may be deleted before
22 // having a chance to start).
23 virtual void Remove(ExtensionHost* host) = 0;
24};
25
26} // namespace extensions
27
28#endif // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_