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

Unified Diff: sky/engine/tonic/dart_state.h

Issue 1170963003: Sky: Add a DartConverterEnum and use that for all our enum needs. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: 360 no scope 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/tonic/dart_converter.h ('k') | sky/engine/tonic/dart_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/tonic/dart_state.h
diff --git a/sky/engine/tonic/dart_state.h b/sky/engine/tonic/dart_state.h
index 9602b7e75a9dcf709d49cc1bbb417631f640c477..27d25e389aeef121b26c2b8878bb4192753cf1b3 100644
--- a/sky/engine/tonic/dart_state.h
+++ b/sky/engine/tonic/dart_state.h
@@ -11,6 +11,7 @@
#include "dart/runtime/include/dart_api.h"
#include "sky/engine/tonic/dart_api_scope.h"
#include "sky/engine/tonic/dart_isolate_scope.h"
+#include "sky/engine/tonic/dart_persistent_value.h"
#include "sky/engine/wtf/OwnPtr.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
@@ -50,7 +51,7 @@ class DartState : public base::SupportsUserData {
void set_isolate(Dart_Isolate isolate) {
CHECK(!isolate_);
isolate_ = isolate;
- DidSetIsolate();
+ DidSetIsolateInternal();
}
DartClassLibrary& class_library() { return *class_library_; }
@@ -58,9 +59,13 @@ class DartState : public base::SupportsUserData {
DartExceptionFactory& exception_factory() { return *exception_factory_; }
DartTimerHeap& timer_heap() { return *timer_heap_; }
+ Dart_Handle index_handle() { return index_handle_.value(); }
+
virtual void DidSetIsolate() {}
private:
+ void DidSetIsolateInternal();
+
Dart_Isolate isolate_;
OwnPtr<DartClassLibrary> class_library_;
OwnPtr<DartStringCache> string_cache_;
@@ -68,6 +73,7 @@ class DartState : public base::SupportsUserData {
OwnPtr<DartTimerHeap> timer_heap_;
base::WeakPtrFactory<DartState> weak_factory_;
+ DartPersistentValue index_handle_;
DISALLOW_COPY_AND_ASSIGN(DartState);
};
« no previous file with comments | « sky/engine/tonic/dart_converter.h ('k') | sky/engine/tonic/dart_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698