| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #ifndef StyleResourceLoader_h | 23 #ifndef StyleResourceLoader_h |
| 24 #define StyleResourceLoader_h | 24 #define StyleResourceLoader_h |
| 25 | 25 |
| 26 #include "wtf/OwnPtr.h" | 26 #include "platform/heap/Handle.h" |
| 27 #include "wtf/PassRefPtr.h" | 27 #include "wtf/Forward.h" |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class ElementStyleResources; | 31 class ElementStyleResources; |
| 32 class Document; | 32 class Document; |
| 33 class LayoutStyle; | 33 class LayoutStyle; |
| 34 class RenderStyle; | 34 class RenderStyle; |
| 35 class ShapeValue; | 35 class ShapeValue; |
| 36 class StyleImage; | 36 class StyleImage; |
| 37 class StylePendingImage; | 37 class StylePendingImage; |
| 38 | 38 |
| 39 // Manages loading of resources, requested by the stylesheets. | 39 // Manages loading of resources, requested by the stylesheets. |
| 40 // Expects the same lifetime as StyleResolver, because | 40 // Expects the same lifetime as StyleResolver, because |
| 41 // it expects Document to never change. | 41 // it expects Document to never change. |
| 42 class StyleResourceLoader { | 42 class StyleResourceLoader final { |
| 43 WTF_MAKE_NONCOPYABLE(StyleResourceLoader); | 43 WTF_MAKE_NONCOPYABLE(StyleResourceLoader); |
| 44 DISALLOW_ALLOCATION(); |
| 44 public: | 45 public: |
| 45 explicit StyleResourceLoader(Document*); | 46 explicit StyleResourceLoader(Document*); |
| 46 | 47 |
| 47 void loadPendingResources(LayoutStyle*, ElementStyleResources&); | 48 void loadPendingResources(LayoutStyle*, ElementStyleResources&); |
| 48 | 49 |
| 50 DECLARE_TRACE(); |
| 51 |
| 49 private: | 52 private: |
| 50 void loadPendingSVGDocuments(LayoutStyle*, ElementStyleResources&); | 53 void loadPendingSVGDocuments(LayoutStyle*, ElementStyleResources&); |
| 51 | 54 |
| 52 PassRefPtr<StyleImage> loadPendingImage(StylePendingImage*, float deviceScal
eFactor); | 55 PassRefPtr<StyleImage> loadPendingImage(StylePendingImage*, float deviceScal
eFactor); |
| 53 void loadPendingImages(LayoutStyle*, ElementStyleResources&); | 56 void loadPendingImages(LayoutStyle*, ElementStyleResources&); |
| 54 void loadPendingShapeImage(LayoutStyle*, ShapeValue*, float deviceScaleFacto
r); | 57 void loadPendingShapeImage(LayoutStyle*, ShapeValue*, float deviceScaleFacto
r); |
| 55 | 58 |
| 56 Document* m_document; | 59 RawPtrWillBeMember<Document> m_document; |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 } // namespace blink | 62 } // namespace blink |
| 60 | 63 |
| 61 #endif // StyleResourceLoader_h | 64 #endif // StyleResourceLoader_h |
| OLD | NEW |