| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| 11 version 2 of the License, or (at your option) any later version. | 11 version 2 of the License, or (at your option) any later version. |
| 12 | 12 |
| 13 This library is distributed in the hope that it will be useful, | 13 This library is distributed in the hope that it will be useful, |
| 14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 Library General Public License for more details. | 16 Library General Public License for more details. |
| 17 | 17 |
| 18 You should have received a copy of the GNU Library General Public License | 18 You should have received a copy of the GNU Library General Public License |
| 19 along with this library; see the file COPYING.LIB. If not, write to | 19 along with this library; see the file COPYING.LIB. If not, write to |
| 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 Boston, MA 02110-1301, USA. | 21 Boston, MA 02110-1301, USA. |
| 22 | 22 |
| 23 This class provides all functionality needed for loading images, style sheet
s and html | 23 This class provides all functionality needed for loading images, style sheet
s and html |
| 24 pages from the web. It has a memory cache for these objects. | 24 pages from the web. It has a memory cache for these objects. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "sky/engine/config.h" |
| 28 #include "core/fetch/ResourceFetcher.h" | 28 #include "sky/engine/core/fetch/ResourceFetcher.h" |
| 29 | 29 |
| 30 #include "bindings/core/v8/ScriptController.h" | |
| 31 #include "gen/sky/core/FetchInitiatorTypeNames.h" | 30 #include "gen/sky/core/FetchInitiatorTypeNames.h" |
| 32 #include "core/dom/Document.h" | |
| 33 #include "core/fetch/FetchContext.h" | |
| 34 #include "core/fetch/FontResource.h" | |
| 35 #include "core/fetch/ImageResource.h" | |
| 36 #include "core/fetch/MemoryCache.h" | |
| 37 #include "core/fetch/RawResource.h" | |
| 38 #include "core/fetch/ResourceLoader.h" | |
| 39 #include "core/fetch/ResourceLoaderSet.h" | |
| 40 #include "core/frame/LocalDOMWindow.h" | |
| 41 #include "core/frame/LocalFrame.h" | |
| 42 #include "core/frame/Settings.h" | |
| 43 #include "core/frame/UseCounter.h" | |
| 44 #include "core/html/HTMLElement.h" | |
| 45 #include "core/html/imports/HTMLImportsController.h" | |
| 46 #include "core/inspector/ConsoleMessage.h" | |
| 47 #include "core/loader/FrameLoaderClient.h" | |
| 48 #include "core/loader/UniqueIdentifier.h" | |
| 49 #include "core/page/Page.h" | |
| 50 #include "platform/Logging.h" | |
| 51 #include "gen/sky/platform/RuntimeEnabledFeatures.h" | 31 #include "gen/sky/platform/RuntimeEnabledFeatures.h" |
| 52 #include "platform/SharedBuffer.h" | 32 #include "sky/engine/bindings/core/v8/ScriptController.h" |
| 53 #include "platform/TraceEvent.h" | 33 #include "sky/engine/core/dom/Document.h" |
| 54 #include "platform/weborigin/SecurityPolicy.h" | 34 #include "sky/engine/core/fetch/FetchContext.h" |
| 55 #include "public/platform/Platform.h" | 35 #include "sky/engine/core/fetch/FontResource.h" |
| 56 #include "public/platform/WebURL.h" | 36 #include "sky/engine/core/fetch/ImageResource.h" |
| 57 #include "public/platform/WebURLRequest.h" | 37 #include "sky/engine/core/fetch/MemoryCache.h" |
| 58 #include "wtf/text/CString.h" | 38 #include "sky/engine/core/fetch/RawResource.h" |
| 59 #include "wtf/text/WTFString.h" | 39 #include "sky/engine/core/fetch/ResourceLoader.h" |
| 40 #include "sky/engine/core/fetch/ResourceLoaderSet.h" |
| 41 #include "sky/engine/core/frame/LocalDOMWindow.h" |
| 42 #include "sky/engine/core/frame/LocalFrame.h" |
| 43 #include "sky/engine/core/frame/Settings.h" |
| 44 #include "sky/engine/core/frame/UseCounter.h" |
| 45 #include "sky/engine/core/html/HTMLElement.h" |
| 46 #include "sky/engine/core/html/imports/HTMLImportsController.h" |
| 47 #include "sky/engine/core/inspector/ConsoleMessage.h" |
| 48 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 49 #include "sky/engine/core/loader/UniqueIdentifier.h" |
| 50 #include "sky/engine/core/page/Page.h" |
| 51 #include "sky/engine/platform/Logging.h" |
| 52 #include "sky/engine/platform/SharedBuffer.h" |
| 53 #include "sky/engine/platform/TraceEvent.h" |
| 54 #include "sky/engine/platform/weborigin/SecurityPolicy.h" |
| 55 #include "sky/engine/public/platform/Platform.h" |
| 56 #include "sky/engine/public/platform/WebURL.h" |
| 57 #include "sky/engine/public/platform/WebURLRequest.h" |
| 58 #include "sky/engine/wtf/text/CString.h" |
| 59 #include "sky/engine/wtf/text/WTFString.h" |
| 60 | 60 |
| 61 using blink::WebURLRequest; | 61 using blink::WebURLRequest; |
| 62 | 62 |
| 63 namespace blink { | 63 namespace blink { |
| 64 | 64 |
| 65 static Resource* createResource(Resource::Type type, const ResourceRequest& requ
est, const String& charset) | 65 static Resource* createResource(Resource::Type type, const ResourceRequest& requ
est, const String& charset) |
| 66 { | 66 { |
| 67 switch (type) { | 67 switch (type) { |
| 68 case Resource::Image: | 68 case Resource::Image: |
| 69 return new ImageResource(request); | 69 return new ImageResource(request); |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 case Revalidate: | 762 case Revalidate: |
| 763 ++m_revalidateCount; | 763 ++m_revalidateCount; |
| 764 return; | 764 return; |
| 765 case Use: | 765 case Use: |
| 766 ++m_useCount; | 766 ++m_useCount; |
| 767 return; | 767 return; |
| 768 } | 768 } |
| 769 } | 769 } |
| 770 | 770 |
| 771 } | 771 } |
| OLD | NEW |