Web Inspector: NMI: remove the dependency of platform sources from WebCore header introduced by NMI instrumentation.
https://bugs.webkit.org/show_bug.cgi?id=96367

Reviewed by Yury Semikhatsky.

the target is to move 'platform' specific instrumentation code
from WebCoreMemoryInstrumentation into the new PlatformMemoryInstrumentation.

Drive by fix: New type DOM.Image was introduced.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
* platform/KURL.cpp:
* platform/KURLGoogle.cpp:
* platform/PlatformMemoryInstrumentation.cpp: Copied from Source/WebCore/platform/graphics/GeneratedImage.cpp.
(WebCore):
* platform/PlatformMemoryInstrumentation.h: Copied from Source/WebCore/platform/graphics/GeneratedImage.cpp.
(WebCore):
(PlatformMemoryTypes):
* platform/SharedBuffer.cpp:
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::reportMemoryUsage):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratedImage.cpp:
(WebCore::GeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratorGeneratedImage.h:
* platform/graphics/Image.cpp:
(WebCore::Image::reportMemoryUsage):
* platform/network/FormData.cpp:
(WebCore::FormData::reportMemoryUsage):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::reportMemoryUsage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/PlatformMemoryInstrumentation.h b/Source/WebCore/platform/PlatformMemoryInstrumentation.h
new file mode 100644
index 0000000..22b9097
--- /dev/null
+++ b/Source/WebCore/platform/PlatformMemoryInstrumentation.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PlatformMemoryInstrumentation_h
+#define PlatformMemoryInstrumentation_h
+
+#include <wtf/MemoryInstrumentation.h>
+
+namespace WebCore {
+
+using WTF::MemoryClassInfo;
+using WTF::MemoryObjectType;
+
+class PlatformMemoryTypes {
+public:
+    static MemoryObjectType Image;
+    static MemoryObjectType Loader;
+};
+
+} // namespace WebCore
+
+#endif // !defined(PlatformMemoryInstrumentation_h)