Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef OffScreenCanvas_h | |
| 6 #define OffScreenCanvas_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "bindings/core/v8/ScriptState.h" | |
| 10 #include "bindings/core/v8/ScriptWrappable.h" | |
| 11 #include "core/CoreExport.h" | |
| 12 #include "platform/geometry/IntSize.h" | |
| 13 #include "platform/heap/Handle.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class CORE_EXPORT OffScreenCanvas final : public GarbageCollectedFinalized<OffSc reenCanvas>, public ScriptWrappable { | |
| 18 DEFINE_WRAPPERTYPEINFO(); | |
| 19 public: | |
| 20 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.
| |
| 21 | |
| 22 IntSize size() const { return m_size; } | |
| 23 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.
| |
| 24 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.
| |
| 25 | |
| 26 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.
| |
| 27 void setHeight(unsigned long height) { m_size.setHeight(height); } | |
| 28 | |
| 29 DECLARE_VIRTUAL_TRACE(); | |
| 30 | |
| 31 private: | |
| 32 OffScreenCanvas(const IntSize&); | |
| 33 | |
| 34 IntSize m_size; | |
| 35 }; | |
| 36 | |
| 37 } // namespace blink | |
| 38 | |
| 39 #endif // OffScreenCanvas_h | |
| OLD | NEW |