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

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

Issue 709203002: Remove more oilpan. (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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 explicit CSSCanvasValue(const String& name) 56 explicit CSSCanvasValue(const String& name)
57 : CSSImageGeneratorValue(CanvasClass) 57 : CSSImageGeneratorValue(CanvasClass)
58 , m_canvasObserver(adoptPtr(new CanvasObserverProxy(this))) 58 , m_canvasObserver(adoptPtr(new CanvasObserverProxy(this)))
59 , m_name(name) 59 , m_name(name)
60 , m_element(nullptr) 60 , m_element(nullptr)
61 { 61 {
62 } 62 }
63 63
64 // 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
65 // to avoid adding a vptr to CSSCanvasValue. 65 // to avoid adding a vptr to CSSCanvasValue.
66 class CanvasObserverProxy final : public DummyBase<CanvasObserverProxy>, pub lic CanvasObserver { 66 class CanvasObserverProxy final : public CanvasObserver {
67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CanvasObserverProxy);
68 public: 67 public:
69 explicit CanvasObserverProxy(CSSCanvasValue* ownerValue) : m_ownerValue( ownerValue) { } 68 explicit CanvasObserverProxy(CSSCanvasValue* ownerValue) : m_ownerValue( ownerValue) { }
70 69
71 virtual void canvasChanged(HTMLCanvasElement* canvas, const FloatRect& c hangedRect) override 70 virtual void canvasChanged(HTMLCanvasElement* canvas, const FloatRect& c hangedRect) override
72 { 71 {
73 m_ownerValue->canvasChanged(canvas, changedRect); 72 m_ownerValue->canvasChanged(canvas, changedRect);
74 } 73 }
75 virtual void canvasResized(HTMLCanvasElement* canvas) override 74 virtual void canvasResized(HTMLCanvasElement* canvas) override
76 { 75 {
77 m_ownerValue->canvasResized(canvas); 76 m_ownerValue->canvasResized(canvas);
(...skipping 24 matching lines...) Expand all
102 String m_name; 101 String m_name;
103 // The document supplies the element and owns it. 102 // The document supplies the element and owns it.
104 RawPtr<HTMLCanvasElement> m_element; 103 RawPtr<HTMLCanvasElement> m_element;
105 }; 104 };
106 105
107 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCanvasValue, isCanvasValue()); 106 DEFINE_CSS_VALUE_TYPE_CASTS(CSSCanvasValue, isCanvasValue());
108 107
109 } // namespace blink 108 } // namespace blink
110 109
111 #endif // CSSCanvasValue_h 110 #endif // CSSCanvasValue_h
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSCalculationValue.cpp ('k') | sky/engine/core/css/CSSDefaultStyleSheets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698