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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CSSPaintImageGeneratorImpl_h
6 #define CSSPaintImageGeneratorImpl_h
7
8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "core/css/CSSPaintImageGenerator.h"
10 #include "platform/geometry/IntSize.h"
11 #include "platform/heap/Handle.h"
12 #include <v8.h>
13
14 namespace blink {
15
16 class CSSPaintDefinition;
17 class Document;
18 class Image;
19
20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator {
21 public:
22 static CSSPaintImageGenerator* create(const String& name, Document&, Observe r*);
23 ~CSSPaintImageGeneratorImpl() override;
24
25 PassRefPtr<Image> paint(const IntSize&) final;
26
27 void setDefinition(CSSPaintDefinition*);
28
29 DECLARE_VIRTUAL_TRACE();
30
31 private:
32 CSSPaintImageGeneratorImpl(Observer*);
33 CSSPaintImageGeneratorImpl(CSSPaintDefinition*);
34
35 Member<CSSPaintDefinition> m_definition;
36 Observer* m_observer;
37
38 // An instance of the paint class is owned and kept alive by this class.
39 ScopedPersistent<v8::Object> m_instance;
40 };
41
42 } // namespace blink
43
44 #endif // CSSPaintImageGeneratorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698