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

Side by Side Diff: Source/core/html/canvas/CanvasPattern.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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 #include "wtf/Forward.h" 31 #include "wtf/Forward.h"
32 #include "wtf/PassRefPtr.h" 32 #include "wtf/PassRefPtr.h"
33 #include "wtf/RefCounted.h" 33 #include "wtf/RefCounted.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class ExceptionState; 37 class ExceptionState;
38 class Image; 38 class Image;
39 39
40 class CanvasPattern FINAL : public RefCountedWillBeGarbageCollectedFinalized<Can vasPattern>, public ScriptWrappable { 40 class CanvasPattern FINAL : public RefCountedWillBeGarbageCollectedFinalized<Can vasPattern>, public ScriptWrappable {
41 DEFINE_WRAPPERTYPEINFO();
41 public: 42 public:
42 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState &); 43 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState &);
43 44
44 static PassRefPtrWillBeRawPtr<CanvasPattern> create(PassRefPtr<Image> image, 45 static PassRefPtrWillBeRawPtr<CanvasPattern> create(PassRefPtr<Image> image,
45 Pattern::RepeatMode repeat, bool originClean) 46 Pattern::RepeatMode repeat, bool originClean)
46 { 47 {
47 return adoptRefWillBeNoop(new CanvasPattern(image, repeat, originClean)) ; 48 return adoptRefWillBeNoop(new CanvasPattern(image, repeat, originClean)) ;
48 } 49 }
49 50
50 Pattern* pattern() const { return m_pattern.get(); } 51 Pattern* pattern() const { return m_pattern.get(); }
51 52
52 bool originClean() const { return m_originClean; } 53 bool originClean() const { return m_originClean; }
53 54
54 void trace(Visitor*) { } 55 void trace(Visitor*) { }
55 56
56 private: 57 private:
57 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean); 58 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean);
58 59
59 RefPtr<Pattern> m_pattern; 60 RefPtr<Pattern> m_pattern;
60 bool m_originClean; 61 bool m_originClean;
61 }; 62 };
62 63
63 } // namespace blink 64 } // namespace blink
64 65
65 #endif 66 #endif // CanvasPattern_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasGradient.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698