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

Side by Side Diff: Source/core/html/canvas/Path2D.h

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 22 matching lines...) Expand all
33 #include "core/svg/SVGMatrixTearOff.h" 33 #include "core/svg/SVGMatrixTearOff.h"
34 #include "core/svg/SVGPathUtilities.h" 34 #include "core/svg/SVGPathUtilities.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "platform/transforms/AffineTransform.h" 36 #include "platform/transforms/AffineTransform.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class Path2D FINAL : public RefCountedWillBeGarbageCollectedFinalized<Path2D>, p ublic CanvasPathMethods, public ScriptWrappable { 42 class Path2D FINAL : public RefCountedWillBeGarbageCollectedFinalized<Path2D>, p ublic CanvasPathMethods, public ScriptWrappable {
43 WTF_MAKE_NONCOPYABLE(Path2D); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 43 DEFINE_WRAPPERTYPEINFO();
44 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
45 WTF_MAKE_NONCOPYABLE(Path2D);
44 public: 46 public:
45 static PassRefPtrWillBeRawPtr<Path2D> create() { return adoptRefWillBeNoop(n ew Path2D); } 47 static PassRefPtrWillBeRawPtr<Path2D> create() { return adoptRefWillBeNoop(n ew Path2D); }
46 static PassRefPtrWillBeRawPtr<Path2D> create(const String& pathData) { retur n adoptRefWillBeNoop(new Path2D(pathData)); } 48 static PassRefPtrWillBeRawPtr<Path2D> create(const String& pathData) { retur n adoptRefWillBeNoop(new Path2D(pathData)); }
47 static PassRefPtrWillBeRawPtr<Path2D> create(Path2D* path) { return adoptRef WillBeNoop(new Path2D(path)); } 49 static PassRefPtrWillBeRawPtr<Path2D> create(Path2D* path) { return adoptRef WillBeNoop(new Path2D(path)); }
48 50
49 static PassRefPtrWillBeRawPtr<Path2D> create(const Path& path) { return adop tRefWillBeNoop(new Path2D(path)); } 51 static PassRefPtrWillBeRawPtr<Path2D> create(const Path& path) { return adop tRefWillBeNoop(new Path2D(path)); }
50 52
51 const Path& path() const { return m_path; } 53 const Path& path() const { return m_path; }
52 54
53 void addPath(Path2D* path) 55 void addPath(Path2D* path)
(...skipping 29 matching lines...) Expand all
83 } 85 }
84 86
85 Path2D(const String& pathData) 87 Path2D(const String& pathData)
86 : CanvasPathMethods() 88 : CanvasPathMethods()
87 { 89 {
88 ScriptWrappable::init(this); 90 ScriptWrappable::init(this);
89 buildPathFromString(pathData, m_path); 91 buildPathFromString(pathData, m_path);
90 } 92 }
91 }; 93 };
92 94
93 } 95 } // namespace blink
94 #endif 96
97 #endif // Path2D_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/OESVertexArrayObject.h ('k') | Source/core/html/canvas/WebGLActiveInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698