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

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMPointReadOnly.h

Issue 2587743002: The DOMPointReadOnly interface requires serializer. (Closed)
Patch Set: The DOMPoint/DOMPointReadOnly implementation are different with spec. They should match up with the… Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DOMPointReadOnly_h 5 #ifndef DOMPointReadOnly_h
6 #define DOMPointReadOnly_h 6 #define DOMPointReadOnly_h
7 7
8 #include "bindings/core/v8/ScriptValue.h"
8 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/core/v8/V8ObjectBuilder.h"
zino 2016/12/18 21:14:55 nit: This should be moved to cpp file.
foolip 2016/12/19 12:33:42 Yep, and ScriptValue can also be forward declared,
9 #include "core/CoreExport.h" 11 #include "core/CoreExport.h"
10 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
11 13
12 namespace blink { 14 namespace blink {
13 15
14 class CORE_EXPORT DOMPointReadOnly : public GarbageCollected<DOMPointReadOnly>, 16 class CORE_EXPORT DOMPointReadOnly : public GarbageCollected<DOMPointReadOnly>,
15 public ScriptWrappable { 17 public ScriptWrappable {
16 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
17 19
18 public: 20 public:
19 static DOMPointReadOnly* create(double x, double y, double z, double w); 21 static DOMPointReadOnly* create(double x, double y, double z, double w);
20 22
21 double x() const { return m_x; } 23 double x() const { return m_x; }
22 double y() const { return m_y; } 24 double y() const { return m_y; }
23 double z() const { return m_z; } 25 double z() const { return m_z; }
24 double w() const { return m_w; } 26 double w() const { return m_w; }
25 27
26 DEFINE_INLINE_TRACE() {} 28 DEFINE_INLINE_TRACE() {}
27 29
30 ScriptValue toJSONForBinding(ScriptState*) const;
31
28 protected: 32 protected:
29 DOMPointReadOnly(double x, double y, double z, double w); 33 DOMPointReadOnly(double x, double y, double z, double w);
30 34
31 double m_x; 35 double m_x;
32 double m_y; 36 double m_y;
33 double m_z; 37 double m_z;
34 double m_w; 38 double m_w;
35 }; 39 };
36 40
37 } // namespace blink 41 } // namespace blink
38 42
39 #endif 43 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698