Bug 1288300 - Remove unused MediaCallbackID files; r=jwwang
authorKaku Kuo <tkuo@mozilla.com>
Thu, 21 Jul 2016 10:57:57 +0800
changeset 345885 259109f5fadae72d9cf7d1a004f69bd94711b600
parent 345884 d4ec1b2cf832673078935f9e57cff6061c1bec16
child 345886 db0243f4762576ce4874d56bd3c92c56fcf78ab7
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1288300
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288300 - Remove unused MediaCallbackID files; r=jwwang MozReview-Commit-ID: 6vb8RWQHCu
dom/media/AccurateSeekTask.h
dom/media/MediaCallbackID.cpp
dom/media/MediaCallbackID.h
dom/media/MediaDecoderStateMachine.h
dom/media/SeekTask.h
dom/media/moz.build
--- a/dom/media/AccurateSeekTask.h
+++ b/dom/media/AccurateSeekTask.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 ACCURATE_SEEK_TASK_H
 #define ACCURATE_SEEK_TASK_H
 
 #include "SeekTask.h"
-#include "MediaCallbackID.h"
 #include "MediaDecoderReader.h"
 #include "SeekJob.h"
 
 namespace mozilla {
 
 class AccurateSeekTask final : public SeekTask {
 public:
   AccurateSeekTask(const void* aDecoderID,
deleted file mode 100644
--- a/dom/media/MediaCallbackID.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "MediaCallbackID.h"
-
-namespace mozilla {
-
-char const* CallbackID::INVALID_TAG = "INVALID_TAG";
-int32_t const CallbackID::INVALID_ID = -1;
-
-CallbackID::CallbackID()
-  : mTag(INVALID_TAG), mID(INVALID_ID)
-{
-}
-
-CallbackID::CallbackID(char const* aTag, int32_t aID /* = 0*/)
-  : mTag(aTag), mID(aID)
-{
-}
-
-CallbackID&
-CallbackID::operator++()
-{
-  ++mID;
-  return *this;
-}
-
-CallbackID
-CallbackID::operator++(int)
-{
-  CallbackID ret = *this;
-  ++(*this); // call prefix++
-  return ret;
-}
-
-bool
-CallbackID::operator==(const CallbackID& rhs) const
-{
-  return (strcmp(mTag, rhs.mTag) == 0) && (mID == rhs.mID);
-}
-
-bool
-CallbackID::operator!=(const CallbackID& rhs) const
-{
-  return !(*this == rhs);
-}
-
-CallbackID::operator int() const
-{
-  return mID;
-}
-
-} // namespace mozilla
deleted file mode 100644
--- a/dom/media/MediaCallbackID.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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 MediaCallbackID_h_
-#define MediaCallbackID_h_
-
-namespace mozilla {
-
-struct CallbackID
-{
-  static char const* INVALID_TAG;
-  static int32_t const INVALID_ID;
-
-  CallbackID();
-
-  explicit CallbackID(char const* aTag, int32_t aID = 0);
-
-  CallbackID& operator++();   // prefix++
-
-  CallbackID operator++(int); // postfix++
-
-  bool operator==(const CallbackID& rhs) const;
-
-  bool operator!=(const CallbackID& rhs) const;
-
-  operator int() const;
-
-private:
-  char const* mTag;
-  int32_t mID;
-};
-
-} // namespace mozilla
-
-#endif // MediaCallbackID_h_
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -83,17 +83,16 @@ hardware (via AudioStream).
 #define MediaDecoderStateMachine_h__
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ReentrantMonitor.h"
 #include "mozilla/StateMirroring.h"
 
 #include "nsAutoPtr.h"
 #include "nsThreadUtils.h"
-#include "MediaCallbackID.h"
 #include "MediaDecoder.h"
 #include "MediaDecoderReader.h"
 #include "MediaDecoderOwner.h"
 #include "MediaEventSource.h"
 #include "MediaMetadataManager.h"
 #include "MediaStatistics.h"
 #include "MediaTimer.h"
 #include "ImageContainer.h"
--- a/dom/media/SeekTask.h
+++ b/dom/media/SeekTask.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 SEEK_TASK_H
 #define SEEK_TASK_H
 
 #include "mozilla/MozPromise.h"
-#include "MediaCallbackID.h"
 #include "SeekTarget.h"
 
 namespace mozilla {
 
 class AbstractThread;
 class MediaData;
 class MediaDecoderReaderWrapper;
 
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -103,17 +103,16 @@ EXPORTS += [
     'DecoderTraits.h',
     'DOMMediaStream.h',
     'EncodedBufferCache.h',
     'FileBlockCache.h',
     'FrameStatistics.h',
     'Intervals.h',
     'Latency.h',
     'MediaCache.h',
-    'MediaCallbackID.h',
     'MediaData.h',
     'MediaDataDemuxer.h',
     'MediaDecoder.h',
     'MediaDecoderOwner.h',
     'MediaDecoderReader.h',
     'MediaDecoderStateMachine.h',
     'MediaEventSource.h',
     'MediaFormatReader.h',
@@ -217,17 +216,16 @@ UNIFIED_SOURCES += [
     'DecoderDoctorDiagnostics.cpp',
     'DOMMediaStream.cpp',
     'EncodedBufferCache.cpp',
     'FileBlockCache.cpp',
     'GetUserMediaRequest.cpp',
     'GraphDriver.cpp',
     'Latency.cpp',
     'MediaCache.cpp',
-    'MediaCallbackID.cpp',
     'MediaData.cpp',
     'MediaDecoder.cpp',
     'MediaDecoderReader.cpp',
     'MediaDecoderReaderWrapper.cpp',
     'MediaDecoderStateMachine.cpp',
     'MediaDeviceInfo.cpp',
     'MediaDevices.cpp',
     'MediaFormatReader.cpp',