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

Unified Diff: sky/engine/core/script/dom_dart_state.h

Issue 921903002: Add DartController and friends (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: More comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/script/dart_loader.cc ('k') | sky/engine/core/script/dom_dart_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dom_dart_state.h
diff --git a/sky/engine/core/script/dom_dart_state.h b/sky/engine/core/script/dom_dart_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..f10aedee3c437c55f92f505d49192b7d4ef8eba9
--- /dev/null
+++ b/sky/engine/core/script/dom_dart_state.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKY_ENGINE_CORE_SCRIPT_DOM_DART_STATE_H_
+#define SKY_ENGINE_CORE_SCRIPT_DOM_DART_STATE_H_
+
+#include "dart/runtime/include/dart_api.h"
+#include "sky/engine/tonic/dart_state.h"
+#include "sky/engine/core/dom/Document.h"
+#include "sky/engine/wtf/RefPtr.h"
+
+namespace blink {
+class DartLoader;
+class LocalFrame;
+class LocalDOMWindow;
+
+class DOMDartState : public DartState {
+ public:
+ explicit DOMDartState(Document* document);
+ ~DOMDartState() override;
+
+ static DOMDartState* Current();
+
+ static Document* CurrentDocument();
+ static LocalFrame* CurrentFrame();
+ static LocalDOMWindow* CurrentWindow();
+
+ Document* document() const { return document_.get(); }
+ DartLoader& loader() const { return *loader_; }
+
+ private:
+ RefPtr<Document> document_;
+ OwnPtr<DartLoader> loader_;
+};
+
+}
+
+#endif // SKY_ENGINE_CORE_SCRIPT_DOM_DART_STATE_H_
« no previous file with comments | « sky/engine/core/script/dart_loader.cc ('k') | sky/engine/core/script/dom_dart_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698