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

Unified Diff: third_party/WebKit/Source/modules/csspaint/Geometry.h

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments + rebase. Created 4 years, 8 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: third_party/WebKit/Source/modules/csspaint/Geometry.h
diff --git a/third_party/WebKit/Source/modules/csspaint/Geometry.h b/third_party/WebKit/Source/modules/csspaint/Geometry.h
new file mode 100644
index 0000000000000000000000000000000000000000..066263b2a0c1122b464e030ad2d10cf2c20b606a
--- /dev/null
+++ b/third_party/WebKit/Source/modules/csspaint/Geometry.h
@@ -0,0 +1,32 @@
+// Copyright 2016 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 Geometry_h
+#define Geometry_h
+
+namespace blink {
+
+class Geometry : public GarbageCollectedFinalized<Geometry>, public ScriptWrappable {
+ WTF_MAKE_NONCOPYABLE(Geometry);
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static Geometry* create(IntSize size)
+ {
+ return new Geometry(size);
+ }
+ virtual ~Geometry() {}
+
+ int width() const { return m_size.width(); }
+ int height() const { return m_size.height(); }
+
+ DEFINE_INLINE_TRACE() { }
+private:
+ explicit Geometry(IntSize size) : m_size(size) { }
+
+ IntSize m_size;
+};
+
+} // namespace blink
+
+#endif // Geometry_h

Powered by Google App Engine
This is Rietveld 408576698