| OLD | NEW |
| (Empty) | |
| 1 // 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 SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ |
| 6 #define SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "sky/engine/wtf/HashSet.h" |
| 10 |
| 11 namespace blink { |
| 12 class DartLoader; |
| 13 |
| 14 // A base class to represent a dependency. |
| 15 class DartDependency { |
| 16 }; |
| 17 |
| 18 // To catch the dependencies for a library, put a DartDependencyCatcher on the |
| 19 // stack during the call to Dart_LoadLibrary. |
| 20 class DartDependencyCatcher { |
| 21 public: |
| 22 explicit DartDependencyCatcher(DartLoader& loader); |
| 23 ~DartDependencyCatcher(); |
| 24 |
| 25 void AddDependency(DartDependency* dependency); |
| 26 const HashSet<DartDependency*>& dependencies() const { return dependencies_; } |
| 27 |
| 28 private: |
| 29 DartLoader& loader_; |
| 30 HashSet<DartDependency*> dependencies_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(DartDependencyCatcher); |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ |
| OLD | NEW |