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

Unified Diff: sky/engine/bindings-dart/core/dart/DartPersistentValue.h

Issue 875013003: Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach any… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: sky/engine/bindings-dart/core/dart/DartPersistentValue.h
diff --git a/sky/engine/platform/LayoutTestSupport.h b/sky/engine/bindings-dart/core/dart/DartPersistentValue.h
similarity index 74%
copy from sky/engine/platform/LayoutTestSupport.h
copy to sky/engine/bindings-dart/core/dart/DartPersistentValue.h
index 72ceaf4fe1e0b3684086703f569f25eb12707959..db92b4e5a71663ec38855c178ef6964d52139f7c 100644
--- a/sky/engine/platform/LayoutTestSupport.h
+++ b/sky/engine/bindings-dart/core/dart/DartPersistentValue.h
@@ -28,21 +28,29 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SKY_ENGINE_PLATFORM_LAYOUTTESTSUPPORT_H_
-#define SKY_ENGINE_PLATFORM_LAYOUTTESTSUPPORT_H_
+#ifndef DartPersistentValue_h
+#define DartPersistentValue_h
-#include "sky/engine/platform/PlatformExport.h"
+#include "bindings/core/dart/DartIsolateDestructionObserver.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/RefPtr.h"
+#include <dart_api.h>
namespace blink {
-class LayoutTestSupport {
+class DartPersistentValue : public DartIsolateDestructionObserver {
+ WTF_MAKE_NONCOPYABLE(DartPersistentValue);
public:
- PLATFORM_EXPORT static bool isRunningLayoutTest();
- PLATFORM_EXPORT static void setIsRunningLayoutTest(bool);
- PLATFORM_EXPORT static bool isFontAntialiasingEnabledForTest();
- PLATFORM_EXPORT static void setFontAntialiasingEnabledForTest(bool);
+ explicit DartPersistentValue(Dart_Handle value);
+ ~DartPersistentValue();
+
+ Dart_PersistentHandle value() const { return m_value; }
+ void clear();
+
+private:
+ Dart_PersistentHandle m_value;
};
-} // namespace blink
+}
-#endif // SKY_ENGINE_PLATFORM_LAYOUTTESTSUPPORT_H_
+#endif // DartPersistentValue_h

Powered by Google App Engine
This is Rietveld 408576698