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

Side by Side Diff: Source/core/css/FontFaceSet.cpp

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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
« no previous file with comments | « Source/core/css/FontFaceSet.h ('k') | Source/core/dom/MessagePort.h » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 FontFaceSet::~FontFaceSet() 160 FontFaceSet::~FontFaceSet()
161 { 161 {
162 } 162 }
163 163
164 Document* FontFaceSet::document() const 164 Document* FontFaceSet::document() const
165 { 165 {
166 return toDocument(scriptExecutionContext()); 166 return toDocument(scriptExecutionContext());
167 } 167 }
168 168
169 EventTargetData* FontFaceSet::eventTargetData()
170 {
171 return &m_eventTargetData;
172 }
173
174 EventTargetData* FontFaceSet::ensureEventTargetData()
175 {
176 return &m_eventTargetData;
177 }
178
179 const AtomicString& FontFaceSet::interfaceName() const 169 const AtomicString& FontFaceSet::interfaceName() const
180 { 170 {
181 return eventNames().interfaceForFontFaceSet; 171 return eventNames().interfaceForFontFaceSet;
182 } 172 }
183 173
184 ScriptExecutionContext* FontFaceSet::scriptExecutionContext() const 174 ScriptExecutionContext* FontFaceSet::scriptExecutionContext() const
185 { 175 {
186 return ActiveDOMObject::scriptExecutionContext(); 176 return ActiveDOMObject::scriptExecutionContext();
187 } 177 }
188 178
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 435
446 void FontFaceSet::FontLoadHistogram::record() 436 void FontFaceSet::FontLoadHistogram::record()
447 { 437 {
448 if (m_recorded) 438 if (m_recorded)
449 return; 439 return;
450 m_recorded = true; 440 m_recorded = true;
451 HistogramSupport::histogramCustomCounts("WebFont.WebFontsInPage", m_count, 1 , 100, 50); 441 HistogramSupport::histogramCustomCounts("WebFont.WebFontsInPage", m_count, 1 , 100, 50);
452 } 442 }
453 443
454 } // namespace WebCore 444 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/FontFaceSet.h ('k') | Source/core/dom/MessagePort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698