module_registry_observer.h revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1// Copyright 2014 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 GIN_MODULES_MODULE_REGISTRY_OBSERVER_H_
6#define GIN_MODULES_MODULE_REGISTRY_OBSERVER_H_
7
8#include <string>
9#include <vector>
10
11#include "gin/gin_export.h"
12
13namespace gin {
14
15// Notified of interesting events from ModuleRegistry.
16class GIN_EXPORT ModuleRegistryObserver {
17 public:
18  // Called from AddPendingModule(). |id| is the id/name of the module and
19  // |dependencies| this list of modules |id| depends upon.
20  virtual void OnDidAddPendingModule(
21      const std::string& id,
22      const std::vector<std::string>& dependencies) = 0;
23
24 protected:
25  virtual ~ModuleRegistryObserver() {}
26};
27
28}  // namespace gin
29
30#endif  // GIN_MODULES_MODULE_REGISTRY_OBSERVER_H_
31
32