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

Side by Side Diff: sky/engine/tonic/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
« no previous file with comments | « sky/engine/tonic/BUILD.gn ('k') | sky/engine/tonic/dart_dependency_catcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ 5 #ifndef SKY_ENGINE_TONIC_DART_DEPENDENCY_CATCHER_H_
6 #define SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ 6 #define SKY_ENGINE_TONIC_DART_DEPENDENCY_CATCHER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "sky/engine/wtf/HashSet.h" 9 #include "sky/engine/wtf/HashSet.h"
10 10
11 namespace blink { 11 namespace blink {
12 class DartLoader; 12 class DartLibraryLoader;
13 13
14 // A base class to represent a dependency. 14 // A base class to represent a dependency.
15 class DartDependency { 15 class DartDependency {};
16 };
17 16
18 // To catch the dependencies for a library, put a DartDependencyCatcher on the 17 // To catch the dependencies for a library, put a DartDependencyCatcher on the
19 // stack during the call to Dart_LoadLibrary. 18 // stack during the call to Dart_LoadLibrary.
20 class DartDependencyCatcher { 19 class DartDependencyCatcher {
21 public: 20 public:
22 explicit DartDependencyCatcher(DartLoader& loader); 21 explicit DartDependencyCatcher(DartLibraryLoader& loader);
23 ~DartDependencyCatcher(); 22 ~DartDependencyCatcher();
24 23
25 void AddDependency(DartDependency* dependency); 24 void AddDependency(DartDependency* dependency);
26 const HashSet<DartDependency*>& dependencies() const { return dependencies_; } 25 const HashSet<DartDependency*>& dependencies() const { return dependencies_; }
27 26
28 private: 27 private:
29 DartLoader& loader_; 28 DartLibraryLoader& loader_;
30 HashSet<DartDependency*> dependencies_; 29 HashSet<DartDependency*> dependencies_;
31 30
32 DISALLOW_COPY_AND_ASSIGN(DartDependencyCatcher); 31 DISALLOW_COPY_AND_ASSIGN(DartDependencyCatcher);
33 }; 32 };
34 33
35 } // namespace blink 34 } // namespace blink
36 35
37 #endif // SKY_ENGINE_CORE_SCRIPT_DEPENDENCY_CATCHER_H_ 36 #endif // SKY_ENGINE_TONIC_DART_DEPENDENCY_CATCHER_H_
OLDNEW
« no previous file with comments | « sky/engine/tonic/BUILD.gn ('k') | sky/engine/tonic/dart_dependency_catcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698