Bug 907798 - Remove TimeStamp.h includes from source files that do not need it; r=ehsan
authorGabriele Svelto <gsvelto@mozilla.com>
Sat, 24 Aug 2013 08:12:51 +0200
changeset 152213 22d54c058e2a3260c4addaf00debc9e55f964f5c
parent 152212 33a4e19102e7546c953d7d2d38c7870a346818fa
child 152214 beba6103e786e466fb7814aa30b9508161577afd
push idunknown
push userunknown
push dateunknown
reviewersehsan
bugs907798
milestone26.0a1
Bug 907798 - Remove TimeStamp.h includes from source files that do not need it; r=ehsan
content/media/MediaDecoder.h
content/media/MediaResource.h
content/media/plugins/MediaPluginHost.cpp
dom/base/nsDOMNavigationTiming.cpp
dom/base/nsPerformance.cpp
dom/plugins/base/nsPluginTags.cpp
gfx/layers/ipc/PLayerTransaction.ipdl
gfx/layers/opengl/CompositorOGL.h
image/src/FrameBlender.h
image/src/VectorImage.h
netwerk/protocol/http/nsHttpConnection.h
netwerk/protocol/websocket/WebSocketChannel.cpp
tools/profiler/GeckoProfiler.h
tools/profiler/GeckoProfilerFunc.h
tools/profiler/GeckoProfilerImpl.h
widget/windows/winrt/FrameworkView.h
widget/windows/winrt/MetroAppShell.h
xpcom/build/XPCOM.h
xpcom/threads/TimerThread.h
--- a/content/media/MediaDecoder.h
+++ b/content/media/MediaDecoder.h
@@ -185,16 +185,17 @@ destroying the MediaDecoder object.
 #include "nsIObserver.h"
 #include "nsAutoPtr.h"
 #include "nsSize.h"
 #include "prlog.h"
 #include "gfxContext.h"
 #include "gfxRect.h"
 #include "MediaResource.h"
 #include "mozilla/ReentrantMonitor.h"
+#include "mozilla/TimeStamp.h"
 #include "MediaStreamGraph.h"
 #include "MediaDecoderOwner.h"
 #include "AudioChannelCommon.h"
 #include "AbstractMediaDecoder.h"
 
 class nsIStreamListener;
 class nsIMemoryReporter;
 class nsIPrincipal;
--- a/content/media/MediaResource.h
+++ b/content/media/MediaResource.h
@@ -13,16 +13,17 @@
 #include "nsIHttpChannel.h"
 #include "nsIPrincipal.h"
 #include "nsIURI.h"
 #include "nsIStreamListener.h"
 #include "nsIChannelEventSink.h"
 #include "nsIInterfaceRequestor.h"
 #include "MediaCache.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/TimeStamp.h"
 
 // For HTTP seeking, if number of bytes needing to be
 // seeked forward is less than this value then a read is
 // done rather than a byte range request.
 static const int64_t SEEK_VS_READ_THRESHOLD = 32*1024;
 
 static const uint32_t HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE = 416;
 
--- a/content/media/plugins/MediaPluginHost.cpp
+++ b/content/media/plugins/MediaPluginHost.cpp
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "mozilla/Preferences.h"
-#include "mozilla/TimeStamp.h"
 #include "mozilla/dom/TimeRanges.h"
 #include "MediaResource.h"
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "MediaPluginHost.h"
 #include "nsXPCOMStrings.h"
 #include "nsISeekableStream.h"
 #include "MediaPluginReader.h"
 #include "nsIGfxInfo.h"
--- a/dom/base/nsDOMNavigationTiming.cpp
+++ b/dom/base/nsDOMNavigationTiming.cpp
@@ -3,18 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsDOMNavigationTiming.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nsIScriptSecurityManager.h"
 #include "prtime.h"
-#include "TimeStamp.h"
 #include "nsIURI.h"
+#include "mozilla/TimeStamp.h"
 
 nsDOMNavigationTiming::nsDOMNavigationTiming()
 {
   Clear();
 }
 
 nsDOMNavigationTiming::~nsDOMNavigationTiming()
 {
--- a/dom/base/nsPerformance.cpp
+++ b/dom/base/nsPerformance.cpp
@@ -1,23 +1,23 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsPerformance.h"
-#include "TimeStamp.h"
 #include "nsCOMPtr.h"
 #include "nsITimedChannel.h"
 #include "nsDOMNavigationTiming.h"
 #include "nsContentUtils.h"
 #include "nsIDOMWindow.h"
 #include "mozilla/dom/PerformanceBinding.h"
 #include "mozilla/dom/PerformanceTimingBinding.h"
 #include "mozilla/dom/PerformanceNavigationBinding.h"
+#include "mozilla/TimeStamp.h"
 
 using namespace mozilla;
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsPerformanceTiming, mPerformance)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsPerformanceTiming, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsPerformanceTiming, Release)
 
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -12,22 +12,20 @@
 #include "nsPluginsDir.h"
 #include "nsPluginHost.h"
 #include "nsIBlocklistService.h"
 #include "nsIUnicodeDecoder.h"
 #include "nsIPlatformCharset.h"
 #include "nsICharsetConverterManager.h"
 #include "nsPluginLogging.h"
 #include "nsNPAPIPlugin.h"
-#include "mozilla/TimeStamp.h"
 #include "mozilla/Preferences.h"
 #include <cctype>
 
 using namespace mozilla;
-using mozilla::TimeStamp;
 
 // These legacy flags are used in the plugin registry. The states are now
 // stored in prefs, but we still need to be able to import them.
 #define NS_PLUGIN_FLAG_ENABLED      0x0001    // is this plugin enabled?
 // no longer used                   0x0002    // reuse only if regenerating pluginreg.dat
 #define NS_PLUGIN_FLAG_FROMCACHE    0x0004    // this plugintag info was loaded from cache
 // no longer used                   0x0008    // reuse only if regenerating pluginreg.dat
 #define NS_PLUGIN_FLAG_CLICKTOPLAY  0x0020    // this is a click-to-play plugin
--- a/gfx/layers/ipc/PLayerTransaction.ipdl
+++ b/gfx/layers/ipc/PLayerTransaction.ipdl
@@ -9,17 +9,16 @@ include LayersSurfaces;
 include LayerTransaction;
 include protocol PCompositable;
 include protocol PCompositor;
 include protocol PGrallocBuffer;
 include protocol PLayer;
 include protocol PRenderFrame;
 
 include "mozilla/WidgetUtils.h";
-include "mozilla/TimeStamp.h";
 include "mozilla/dom/ScreenOrientation.h";
 include "nsCSSProperty.h";
 include "gfxipc/ShadowLayerUtils.h";
 include "mozilla/GfxMessageUtils.h";
 
 using mozilla::layers::TextureInfo;
 
 /**
--- a/gfx/layers/opengl/CompositorOGL.h
+++ b/gfx/layers/opengl/CompositorOGL.h
@@ -12,17 +12,16 @@
 #include "GLDefs.h"                     // for GLintptr, GLvoid, etc
 #include "LayerManagerOGLProgram.h"     // for ShaderProgramOGL, etc
 #include "Units.h"                      // for ScreenPoint
 #include "gfxContext.h"                 // for gfxContext
 #include "gfxPoint.h"                   // for gfxIntSize
 #include "mozilla/Assertions.h"         // for MOZ_ASSERT, etc
 #include "mozilla/Attributes.h"         // for MOZ_OVERRIDE, MOZ_FINAL
 #include "mozilla/RefPtr.h"             // for TemporaryRef, RefPtr
-#include "mozilla/TimeStamp.h"          // for TimeStamp
 #include "mozilla/gfx/BaseSize.h"       // for BaseSize
 #include "mozilla/gfx/Point.h"          // for IntSize, Point
 #include "mozilla/gfx/Rect.h"           // for Rect, IntRect
 #include "mozilla/gfx/Types.h"          // for Float, SurfaceFormat, etc
 #include "mozilla/layers/Compositor.h"  // for SurfaceInitMode, Compositor, etc
 #include "mozilla/layers/CompositorTypes.h"  // for MaskType::NumMaskTypes, etc
 #include "mozilla/layers/LayersTypes.h"
 #include "nsAutoPtr.h"                  // for nsRefPtr, nsAutoPtr
@@ -37,16 +36,18 @@
 #include "nscore.h"                     // for NS_IMETHOD
 #include "VBOArena.h"                   // for gl::VBOArena
 
 class gfx3DMatrix;
 class nsIWidget;
 struct gfxMatrix;
 
 namespace mozilla {
+class TimeStamp;
+
 namespace gfx {
 class Matrix4x4;
 }
 
 namespace layers {
 
 class CompositingRenderTarget;
 class CompositingRenderTargetOGL;
--- a/image/src/FrameBlender.h
+++ b/image/src/FrameBlender.h
@@ -3,17 +3,16 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_imagelib_FrameBlender_h_
 #define mozilla_imagelib_FrameBlender_h_
 
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/TimeStamp.h"
 #include "gfxASurface.h"
 #include "imgFrame.h"
 #include "FrameSequence.h"
 #include "nsCOMPtr.h"
 #include "nsISupportsImpl.h"
 
 namespace mozilla {
 namespace image {
--- a/image/src/VectorImage.h
+++ b/image/src/VectorImage.h
@@ -5,17 +5,16 @@
 
 #ifndef mozilla_imagelib_VectorImage_h_
 #define mozilla_imagelib_VectorImage_h_
 
 #include "Image.h"
 #include "nsIStreamListener.h"
 #include "nsIRequest.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/TimeStamp.h"
 #include "mozilla/WeakPtr.h"
 
 class imgDecoderObserver;
 
 namespace mozilla {
 namespace layers {
 class LayerManager;
 class ImageContainer;
--- a/netwerk/protocol/http/nsHttpConnection.h
+++ b/netwerk/protocol/http/nsHttpConnection.h
@@ -10,17 +10,16 @@
 #include "nsHttpConnectionInfo.h"
 #include "nsAHttpTransaction.h"
 #include "nsXPIDLString.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsProxyRelease.h"
 #include "prinrval.h"
 #include "ASpdySession.h"
-#include "mozilla/TimeStamp.h"
 
 #include "nsIStreamListener.h"
 #include "nsISocketTransport.h"
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
 #include "nsIInterfaceRequestor.h"
 
 class nsHttpRequestHead;
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -32,18 +32,18 @@
 #include "nsThreadUtils.h"
 #include "nsError.h"
 #include "nsStringStream.h"
 #include "nsAlgorithm.h"
 #include "nsProxyRelease.h"
 #include "nsNetUtil.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
-#include "TimeStamp.h"
 #include "mozilla/Telemetry.h"
+#include "mozilla/TimeStamp.h"
 
 #include "plbase64.h"
 #include "prmem.h"
 #include "prnetdb.h"
 #include "prbit.h"
 #include "zlib.h"
 #include <algorithm>
 
--- a/tools/profiler/GeckoProfiler.h
+++ b/tools/profiler/GeckoProfiler.h
@@ -45,17 +45,20 @@
  * 't' - Elapse time since recording started.
  *
  */
 
 #ifndef SAMPLER_H
 #define SAMPLER_H
 
 #include "mozilla/NullPtr.h"
-#include "mozilla/TimeStamp.h"
+
+namespace mozilla {
+class TimeStamp;
+}
 
 #ifndef MOZ_ENABLE_PROFILER_SPS
 
 struct JSContext;
 class JSObject;
 
 // Insert a RAII in this scope to active a pseudo label. Any samples collected
 // in this scope will contain this annotation. For dynamic strings use
--- a/tools/profiler/GeckoProfilerFunc.h
+++ b/tools/profiler/GeckoProfilerFunc.h
@@ -3,17 +3,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef PROFILER_FUNCS_H
 #define PROFILER_FUNCS_H
 
 #include "mozilla/NullPtr.h"
 #include <stdint.h>
-#include "mozilla/TimeStamp.h"
+
+namespace mozilla {
+class TimeDuration;
+class TimeStamp;
+}
 
 using mozilla::TimeStamp;
 using mozilla::TimeDuration;
 
 struct JSContext;
 class JSObject;
 
 // Returns a handle to pass on exit. This can check that we are popping the
--- a/tools/profiler/GeckoProfilerImpl.h
+++ b/tools/profiler/GeckoProfilerImpl.h
@@ -8,17 +8,16 @@
 #define TOOLS_SPS_SAMPLER_H_
 
 #include <stdlib.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <algorithm>
 #include "mozilla/ThreadLocal.h"
 #include "mozilla/Assertions.h"
-#include "mozilla/TimeStamp.h"
 #include "mozilla/Util.h"
 #include "nsAlgorithm.h"
 #include "nscore.h"
 #include "GeckoProfilerFunc.h"
 #include "PseudoStack.h"
 #include "nsISupports.h"
 
 /* QT has a #define for the word "slots" and jsfriendapi.h has a struct with
@@ -32,16 +31,20 @@
 #ifdef min
 #undef min
 #endif
 
 struct PseudoStack;
 class TableTicker;
 class JSCustomObject;
 
+namespace mozilla {
+class TimeStamp;
+}
+
 extern mozilla::ThreadLocal<PseudoStack *> tlsPseudoStack;
 extern mozilla::ThreadLocal<TableTicker *> tlsTicker;
 extern bool stack_key_initialized;
 
 #ifndef SAMPLE_FUNCTION_NAME
 # ifdef __GNUC__
 #  define SAMPLE_FUNCTION_NAME __FUNCTION__
 # elif defined(_MSC_VER)
--- a/widget/windows/winrt/FrameworkView.h
+++ b/widget/windows/winrt/FrameworkView.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #pragma once
 
 #include "nsGUIEvent.h"
-#include "mozilla/TimeStamp.h"
 #include "MetroWidget.h"
 #include "gfxWindowsPlatform.h"
 #include "gfxD2DSurface.h"
 #include "nsDataHashtable.h"
 
 #include "mozwrlbase.h"
 
 #include <windows.system.h>
--- a/widget/windows/winrt/MetroAppShell.h
+++ b/widget/windows/winrt/MetroAppShell.h
@@ -2,17 +2,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #pragma once
 
 #include "nsBaseAppShell.h"
 #include <windows.h>
-#include "mozilla/TimeStamp.h"
 #include "nsWindowsHelpers.h"
 #include "nsIObserver.h"
 
 class MetroAppShell : public nsBaseAppShell
 {
 public:
   NS_DECL_NSIOBSERVER
 
--- a/xpcom/build/XPCOM.h
+++ b/xpcom/build/XPCOM.h
@@ -49,17 +49,16 @@
 
 #include "nsTHashtable.h"
 #include "nsHashKeys.h"
 #include "nsBaseHashtable.h"
 #include "nsDataHashtable.h"
 #include "nsInterfaceHashtable.h"
 #include "nsClassHashtable.h"
 #include "nsRefPtrHashtable.h"
-#include "mozilla/TimeStamp.h"
 
 // interfaces that inherit directly from nsISupports
 
 #include "nsIArray.h"
 #include "nsIAtom.h"
 #include "nsIAtomService.h"
 #include "nsICategoryManager.h"
 #include "nsIClassInfo.h"
--- a/xpcom/threads/TimerThread.h
+++ b/xpcom/threads/TimerThread.h
@@ -13,17 +13,20 @@
 #include "nsTimerImpl.h"
 #include "nsThreadUtils.h"
 
 #include "nsTArray.h"
 
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Monitor.h"
-#include "mozilla/TimeStamp.h"
+
+namespace mozilla {
+class TimeStamp;
+}
 
 class TimerThread MOZ_FINAL : public nsIRunnable,
                               public nsIObserver
 {
 public:
   typedef mozilla::Monitor Monitor;
   typedef mozilla::TimeStamp TimeStamp;
   typedef mozilla::TimeDuration TimeDuration;