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

Unified Diff: third_party/WebKit/Source/core/html/canvas/OffScreenCanvas.h

Issue 1488763002: Start an empty interface OffScreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add width&height Created 5 years 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/core/html/canvas/OffScreenCanvas.h
diff --git a/third_party/WebKit/Source/core/html/canvas/OffScreenCanvas.h b/third_party/WebKit/Source/core/html/canvas/OffScreenCanvas.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc2b1b172bbd3a4f46c79d6260d471ed806b6bb3
--- /dev/null
+++ b/third_party/WebKit/Source/core/html/canvas/OffScreenCanvas.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 OffScreenCanvas_h
+#define OffScreenCanvas_h
+
+#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptState.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/CoreExport.h"
+#include "platform/geometry/IntSize.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class CORE_EXPORT OffScreenCanvas final : public GarbageCollectedFinalized<OffScreenCanvas>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static OffScreenCanvas* create(unsigned long width, unsigned long height);
Justin Novosad 2015/12/03 05:07:59 'long' keyword is superfluous
xidachen 2015/12/03 14:16:17 Done.
+
+ IntSize size() const { return m_size; }
+ unsigned long width() const { return m_size.width(); }
Justin Novosad 2015/12/03 05:07:59 same here
xidachen 2015/12/03 14:16:17 Done.
+ unsigned long height() const { return m_size.height(); }
Justin Novosad 2015/12/03 05:07:59 same here.
xidachen 2015/12/03 14:16:17 Done.
+
+ void setWidth(unsigned long width) { m_size.setWidth(width); }
Justin Novosad 2015/12/03 05:07:59 No 'long'. Implicit cast of unsigned to int may ov
xidachen 2015/12/03 14:16:17 Done.
+ void setHeight(unsigned long height) { m_size.setHeight(height); }
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ OffScreenCanvas(const IntSize&);
+
+ IntSize m_size;
+};
+
+} // namespace blink
+
+#endif // OffScreenCanvas_h

Powered by Google App Engine
This is Rietveld 408576698