blob: 0cf4e1e53a963d0fc0dc1aee1dc5a0c3842e43af [file] [log] [blame] [edit]
// 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.
#include "tonic/dart_dependency_catcher.h"
#include "tonic/dart_library_loader.h"
namespace tonic {
DartDependencyCatcher::DartDependencyCatcher(DartLibraryLoader& loader)
: loader_(loader) {
loader_.set_dependency_catcher(this);
}
DartDependencyCatcher::~DartDependencyCatcher() {
loader_.set_dependency_catcher(nullptr);
}
void DartDependencyCatcher::AddDependency(DartDependency* dependency) {
dependencies_.insert(dependency);
}
} // namespace tonic