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

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

Issue 1210253005: Factor dart_init.cc out of dart_controller.cc (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/frame/LocalFrame.cpp ('k') | sky/engine/core/script/dart_controller.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_CONTROLLER_H_ 5 #ifndef SKY_ENGINE_CORE_SCRIPT_DART_CONTROLLER_H_
6 #define SKY_ENGINE_CORE_SCRIPT_DART_CONTROLLER_H_ 6 #define SKY_ENGINE_CORE_SCRIPT_DART_CONTROLLER_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"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 DartController(); 29 DartController();
30 ~DartController(); 30 ~DartController();
31 31
32 static void InitVM(); 32 static void InitVM();
33 33
34 void RunFromLibrary(const String& name, 34 void RunFromLibrary(const String& name,
35 DartLibraryProvider* library_provider); 35 DartLibraryProvider* library_provider);
36 void RunFromSnapshot(mojo::ScopedDataPipeConsumerHandle snapshot); 36 void RunFromSnapshot(mojo::ScopedDataPipeConsumerHandle snapshot);
37 37
38 void ClearForClose();
39 void CreateIsolateFor(PassOwnPtr<DOMDartState> dom_dart_state); 38 void CreateIsolateFor(PassOwnPtr<DOMDartState> dom_dart_state);
39 void Shutdown();
40 void InstallView(View* view); 40 void InstallView(View* view);
41 41
42 DOMDartState* dart_state() const { return dom_dart_state_.get(); } 42 DOMDartState* dart_state() const { return dom_dart_state_.get(); }
43 43
44 private: 44 private:
45 void DidLoadMainLibrary(String url); 45 void DidLoadMainLibrary(String url);
46 void DidLoadSnapshot(); 46 void DidLoadSnapshot();
47 47
48 OwnPtr<DOMDartState> dom_dart_state_; 48 OwnPtr<DOMDartState> dom_dart_state_;
49 OwnPtr<BuiltinSky> builtin_sky_; 49 OwnPtr<BuiltinSky> builtin_sky_;
50 OwnPtr<DartSnapshotLoader> snapshot_loader_; 50 OwnPtr<DartSnapshotLoader> snapshot_loader_;
51 51
52 base::WeakPtrFactory<DartController> weak_factory_; 52 base::WeakPtrFactory<DartController> weak_factory_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(DartController); 54 DISALLOW_COPY_AND_ASSIGN(DartController);
55 }; 55 };
56 56
57 } 57 }
58 58
59 #endif // SKY_ENGINE_CORE_SCRIPT_DART_CONTROLLER_H_ 59 #endif // SKY_ENGINE_CORE_SCRIPT_DART_CONTROLLER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/frame/LocalFrame.cpp ('k') | sky/engine/core/script/dart_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698