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

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

Issue 919883002: Allow sky apps to be consumers of mojo services (Closed) Base URL: https://github.com/eseidel/skydart.git@master
Patch Set: cr comments Created 5 years, 10 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/core/script/dart_controller.cc ('k') | sky/engine/core/script/dart_loader.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_DART_LOADER_H_ 5 #ifndef SKY_ENGINE_CORE_SCRIPT_DART_LOADER_H_
6 #define SKY_ENGINE_CORE_SCRIPT_DART_LOADER_H_ 6 #define SKY_ENGINE_CORE_SCRIPT_DART_LOADER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "dart/runtime/include/dart_api.h" 11 #include "dart/runtime/include/dart_api.h"
12 #include "sky/engine/wtf/HashMap.h" 12 #include "sky/engine/wtf/HashMap.h"
13 #include "sky/engine/wtf/HashSet.h" 13 #include "sky/engine/wtf/HashSet.h"
14 #include "sky/engine/wtf/OwnPtr.h" 14 #include "sky/engine/wtf/OwnPtr.h"
15 #include "sky/engine/wtf/Vector.h" 15 #include "sky/engine/wtf/Vector.h"
16 #include "sky/engine/wtf/text/WTFString.h" 16 #include "sky/engine/wtf/text/WTFString.h"
17 17
18 namespace blink { 18 namespace blink {
19 class DartState; 19 class DartState;
20 class DartDependency; 20 class DartDependency;
21 class DartDependencyCatcher; 21 class DartDependencyCatcher;
22 22
23 class DartLoader { 23 class DartLoader {
24 public: 24 public:
25 explicit DartLoader(DartState* dart_state); 25 explicit DartLoader(DartState* dart_state);
26 ~DartLoader(); 26 ~DartLoader();
27 27
28 Dart_Handle HandleLibraryTag(Dart_LibraryTag tag, 28 // TODO(dart): This can be called both on the main thread from application iso lates
29 Dart_Handle library, 29 // or from the handle watcher isolate thread.
30 Dart_Handle url); 30 static Dart_Handle HandleLibraryTag(Dart_LibraryTag tag,
31 Dart_Handle library,
32 Dart_Handle url);
31 33
32 void WaitForDependencies(const HashSet<DartDependency*>& dependencies, 34 void WaitForDependencies(const HashSet<DartDependency*>& dependencies,
33 const base::Closure& callback); 35 const base::Closure& callback);
34 36
35 void set_dependency_catcher(DartDependencyCatcher* dependency_catcher) { 37 void set_dependency_catcher(DartDependencyCatcher* dependency_catcher) {
36 DCHECK(!dependency_catcher_ || !dependency_catcher); 38 DCHECK(!dependency_catcher_ || !dependency_catcher);
37 dependency_catcher_ = dependency_catcher; 39 dependency_catcher_ = dependency_catcher;
38 } 40 }
39 41
40 DartState* dart_state() const { return dart_state_.get(); } 42 DartState* dart_state() const { return dart_state_.get(); }
(...skipping 15 matching lines...) Expand all
56 HashSet<OwnPtr<Job>> jobs_; 58 HashSet<OwnPtr<Job>> jobs_;
57 HashSet<OwnPtr<DependencyWatcher>> dependency_watchers_; 59 HashSet<OwnPtr<DependencyWatcher>> dependency_watchers_;
58 DartDependencyCatcher* dependency_catcher_; 60 DartDependencyCatcher* dependency_catcher_;
59 61
60 DISALLOW_COPY_AND_ASSIGN(DartLoader); 62 DISALLOW_COPY_AND_ASSIGN(DartLoader);
61 }; 63 };
62 64
63 } // namespace blink 65 } // namespace blink
64 66
65 #endif // SKY_ENGINE_CORE_SCRIPT_DART_LOADER_H_ 67 #endif // SKY_ENGINE_CORE_SCRIPT_DART_LOADER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/script/dart_controller.cc ('k') | sky/engine/core/script/dart_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698