summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_host_queue.h
blob: 420800bf240783dbd6b734015e0ca4194411d6d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_
#define EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_

namespace extensions {

class DeferredStartRenderHost;

// An interface for a queue of ExtensionHosts waiting for initialization.
// This is used to implement different throttling strategies.
class ExtensionHostQueue {
 public:
  virtual ~ExtensionHostQueue() {}

  // Adds a host to the queue for RenderView creation.
  virtual void Add(DeferredStartRenderHost* host) = 0;

  // Removes a host from the queue (for example, it may be deleted before
  // having a chance to start).
  virtual void Remove(DeferredStartRenderHost* host) = 0;
};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_EXTENSION_HOST_QUEUE_H_