OLD | NEW |
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 #include "tonic/dart_state.h" | 5 #include "tonic/dart_state.h" |
6 | 6 |
7 #include "tonic/dart_class_library.h" | 7 #include "tonic/dart_class_library.h" |
8 #include "tonic/dart_converter.h" | 8 #include "tonic/dart_converter.h" |
9 #include "tonic/dart_exception_factory.h" | 9 #include "tonic/dart_exception_factory.h" |
10 #include "tonic/dart_library_loader.h" | 10 #include "tonic/dart_library_loader.h" |
11 #include "tonic/dart_timer_heap.h" | 11 #include "tonic/dart_timer_heap.h" |
12 | 12 |
13 namespace blink { | 13 namespace tonic { |
14 | 14 |
15 DartState::Scope::Scope(DartState* dart_state) : scope_(dart_state->isolate()) { | 15 DartState::Scope::Scope(DartState* dart_state) : scope_(dart_state->isolate()) { |
16 } | 16 } |
17 | 17 |
18 DartState::Scope::~Scope() { | 18 DartState::Scope::~Scope() { |
19 } | 19 } |
20 | 20 |
21 DartState::DartState() | 21 DartState::DartState() |
22 : isolate_(NULL), | 22 : isolate_(NULL), |
23 class_library_(std::unique_ptr<DartClassLibrary>(new DartClassLibrary)), | 23 class_library_(std::unique_ptr<DartClassLibrary>(new DartClassLibrary)), |
(...skipping 27 matching lines...) Expand all Loading... |
51 } | 51 } |
52 | 52 |
53 DartState* DartState::Current() { | 53 DartState* DartState::Current() { |
54 return static_cast<DartState*>(Dart_CurrentIsolateData()); | 54 return static_cast<DartState*>(Dart_CurrentIsolateData()); |
55 } | 55 } |
56 | 56 |
57 base::WeakPtr<DartState> DartState::GetWeakPtr() { | 57 base::WeakPtr<DartState> DartState::GetWeakPtr() { |
58 return weak_factory_.GetWeakPtr(); | 58 return weak_factory_.GetWeakPtr(); |
59 } | 59 } |
60 | 60 |
61 } // namespace blink | 61 } // namespace tonic |
OLD | NEW |