Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: sky/engine/core/script/dart_dependency_catcher.h

Issue 1202283004: Factor DartLibraryProvider out of DartLoader (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « sky/engine/core/script/dart_controller.cc ('k') | sky/engine/core/script/dart_dependency_catcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698