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

Side by Side Diff: sky/engine/core/css/CSSCanvasValue.h

Issue 683703003: Remove various Heap* types. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | sky/engine/core/css/CSSCanvasValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 PassRefPtr<Image> image(RenderObject*, const IntSize&); 46 PassRefPtr<Image> image(RenderObject*, const IntSize&);
47 bool isFixedSize() const { return true; } 47 bool isFixedSize() const { return true; }
48 IntSize fixedSize(const RenderObject*); 48 IntSize fixedSize(const RenderObject*);
49 49
50 bool isPending() const { return false; } 50 bool isPending() const { return false; }
51 void loadSubimages(ResourceFetcher*) { } 51 void loadSubimages(ResourceFetcher*) { }
52 52
53 bool equals(const CSSCanvasValue&) const; 53 bool equals(const CSSCanvasValue&) const;
54 54
55 void traceAfterDispatch(Visitor*);
56
57 private: 55 private:
58 explicit CSSCanvasValue(const String& name) 56 explicit CSSCanvasValue(const String& name)
59 : CSSImageGeneratorValue(CanvasClass) 57 : CSSImageGeneratorValue(CanvasClass)
60 , m_canvasObserver(adoptPtr(new CanvasObserverProxy(this))) 58 , m_canvasObserver(adoptPtr(new CanvasObserverProxy(this)))
61 , m_name(name) 59 , m_name(name)
62 , m_element(nullptr) 60 , m_element(nullptr)
63 { 61 {
64 } 62 }
65 63
66 // NOTE: We put the CanvasObserver in a member instead of inheriting from it 64 // NOTE: We put the CanvasObserver in a member instead of inheriting from it
(...skipping 10 matching lines...) Expand all
77 virtual void canvasResized(HTMLCanvasElement* canvas) override 75 virtual void canvasResized(HTMLCanvasElement* canvas) override
78 { 76 {
79 m_ownerValue->canvasResized(canvas); 77 m_ownerValue->canvasResized(canvas);
80 } 78 }
81 #if !ENABLE(OILPAN) 79 #if !ENABLE(OILPAN)
82 virtual void canvasDestroyed(HTMLCanvasElement* canvas) override 80 virtual void canvasDestroyed(HTMLCanvasElement* canvas) override
83 { 81 {
84 m_ownerValue->canvasDestroyed(canvas); 82 m_ownerValue->canvasDestroyed(canvas);
85 } 83 }
86 #endif 84 #endif
87 virtual void trace(Visitor* visitor) override
88 {
89 visitor->trace(m_ownerValue);
90 CanvasObserver::trace(visitor);
91 }
92 85
93 private: 86 private:
94 RawPtr<CSSCanvasValue> m_ownerValue; 87 RawPtr<CSSCanvasValue> m_ownerValue;
95 }; 88 };
96 89
97 void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect); 90 void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect);
98 void canvasResized(HTMLCanvasElement*); 91 void canvasResized(HTMLCanvasElement*);
99 92
100 #if !ENABLE(OILPAN) 93 #if !ENABLE(OILPAN)
101 void canvasDestroyed(HTMLCanvasElement*); 94 void canvasDestroyed(HTMLCanvasElement*);
102 #endif 95 #endif
103 96
104 HTMLCanvasElement* element(Document*); 97 HTMLCanvasElement* element(Document*);
105 98
106 OwnPtr<CanvasObserverProxy> m_canvasObserver; 99 OwnPtr<CanvasObserverProxy> m_canvasObserver;
107 100
108 // The name of the canvas. 101 // The name of the canvas.
109 String m_name; 102 String m_name;
110 // The document supplies the element and owns it. 103 // The document supplies the element and owns it.
111 RawPtr<HTMLCanvasElement> m_element; 104 RawPtr<HTMLCanvasElement> m_element;
112 }; 105 };
113 106
114 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCanvasValue, isCanvasValue()); 107 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCanvasValue, isCanvasValue());
115 108
116 } // namespace blink 109 } // namespace blink
117 110
118 #endif // CSSCanvasValue_h 111 #endif // CSSCanvasValue_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/css/CSSCanvasValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698