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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.h

Issue 1858753003: Remove RawPtr from core/css (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
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 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 21 matching lines...) Expand all
32 #include "platform/weborigin/Referrer.h" 32 #include "platform/weborigin/Referrer.h"
33 #include "wtf/PassRefPtr.h" 33 #include "wtf/PassRefPtr.h"
34 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class Document; 38 class Document;
39 39
40 class CSSFontFaceSrcValue : public CSSValue { 40 class CSSFontFaceSrcValue : public CSSValue {
41 public: 41 public:
42 static RawPtr<CSSFontFaceSrcValue> create(const String& specifiedResource, c onst String& absoluteResource, ContentSecurityPolicyDisposition shouldCheckConte ntSecurityPolicy) 42 static CSSFontFaceSrcValue* create(const String& specifiedResource, const St ring& absoluteResource, ContentSecurityPolicyDisposition shouldCheckContentSecur ityPolicy)
43 { 43 {
44 return new CSSFontFaceSrcValue(specifiedResource, absoluteResource, fals e, shouldCheckContentSecurityPolicy); 44 return new CSSFontFaceSrcValue(specifiedResource, absoluteResource, fals e, shouldCheckContentSecurityPolicy);
45 } 45 }
46 static RawPtr<CSSFontFaceSrcValue> createLocal(const String& absoluteResourc e, ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy) 46 static CSSFontFaceSrcValue* createLocal(const String& absoluteResource, Cont entSecurityPolicyDisposition shouldCheckContentSecurityPolicy)
47 { 47 {
48 return new CSSFontFaceSrcValue(emptyString(), absoluteResource, true, sh ouldCheckContentSecurityPolicy); 48 return new CSSFontFaceSrcValue(emptyString(), absoluteResource, true, sh ouldCheckContentSecurityPolicy);
49 } 49 }
50 50
51 const String& resource() const { return m_absoluteResource; } 51 const String& resource() const { return m_absoluteResource; }
52 const String& format() const { return m_format; } 52 const String& format() const { return m_format; }
53 bool isLocal() const { return m_isLocal; } 53 bool isLocal() const { return m_isLocal; }
54 54
55 void setFormat(const String& format) { m_format = format; } 55 void setFormat(const String& format) { m_format = format; }
56 void setReferrer(const Referrer& referrer) { m_referrer = referrer; } 56 void setReferrer(const Referrer& referrer) { m_referrer = referrer; }
(...skipping 30 matching lines...) Expand all
87 String m_specifiedResource; 87 String m_specifiedResource;
88 String m_format; 88 String m_format;
89 Referrer m_referrer; 89 Referrer m_referrer;
90 bool m_isLocal; 90 bool m_isLocal;
91 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; 91 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy;
92 92
93 93
94 class FontResourceHelper : public GarbageCollectedFinalized<FontResourceHelp er>, public ResourceOwner<FontResource> { 94 class FontResourceHelper : public GarbageCollectedFinalized<FontResourceHelp er>, public ResourceOwner<FontResource> {
95 USING_GARBAGE_COLLECTED_MIXIN(FontResourceHelper); 95 USING_GARBAGE_COLLECTED_MIXIN(FontResourceHelper);
96 public: 96 public:
97 static RawPtr<FontResourceHelper> create(RawPtr<FontResource> resource) 97 static FontResourceHelper* create(FontResource* resource)
98 { 98 {
99 return new FontResourceHelper(resource); 99 return new FontResourceHelper(resource);
100 } 100 }
101 101
102 DEFINE_INLINE_VIRTUAL_TRACE() { ResourceOwner<FontResource>::trace(visit or); } 102 DEFINE_INLINE_VIRTUAL_TRACE() { ResourceOwner<FontResource>::trace(visit or); }
103 103
104 private: 104 private:
105 FontResourceHelper(RawPtr<FontResource> resource) 105 FontResourceHelper(FontResource* resource)
106 { 106 {
107 setResource(resource); 107 setResource(resource);
108 } 108 }
109 109
110 String debugName() const override { return "CSSFontFaceSrcValue::FontRes ourceHelper"; } 110 String debugName() const override { return "CSSFontFaceSrcValue::FontRes ourceHelper"; }
111 }; 111 };
112 Member<FontResourceHelper> m_fetched; 112 Member<FontResourceHelper> m_fetched;
113 }; 113 };
114 114
115 DEFINE_CSS_VALUE_TYPE_CASTS(CSSFontFaceSrcValue, isFontFaceSrcValue()); 115 DEFINE_CSS_VALUE_TYPE_CASTS(CSSFontFaceSrcValue, isFontFaceSrcValue());
116 116
117 } // namespace blink 117 } // namespace blink
118 118
119 #endif 119 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFaceRule.h ('k') | third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698