Remove AudioDeviceObserver and make ADM not inherit from the Module interface.

(Re-upload of https://codereview.webrtc.org/3020493002/)

Bug: webrtc:4690, webrtc:7306
Change-Id: I67fb9ebca1296aabc08eae8a292a5c69832dc35e
Reviewed-on: https://webrtc-review.googlesource.com/5360
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20083}
diff --git a/modules/audio_device/include/audio_device.h b/modules/audio_device/include/audio_device.h
index b378f9f..55e6421 100644
--- a/modules/audio_device/include/audio_device.h
+++ b/modules/audio_device/include/audio_device.h
@@ -12,12 +12,12 @@
 #define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_
 
 #include "modules/audio_device/include/audio_device_defines.h"
-#include "modules/include/module.h"
 #include "rtc_base/scoped_ref_ptr.h"
+#include "rtc_base/refcount.h"
 
 namespace webrtc {
 
-class AudioDeviceModule : public RefCountedModule {
+class AudioDeviceModule : public rtc::RefCountInterface {
  public:
   enum ErrorCode {
     kAdmErrNone = 0,
@@ -52,21 +52,11 @@
       const int32_t id,
       const AudioLayer audio_layer);
 
-  // TODO(solenberg): Remove temporary implementation of Module interface.
-  int64_t TimeUntilNextProcess() override {
-    // Make sure Process() isn't called very often.
-    return 1000000;
-  }
-  void Process() override {}
-
   // Retrieve the currently utilized audio layer
   virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
 
   // Error handling
   virtual ErrorCode LastError() const = 0;
-  virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) {
-    return 0;
-  }
 
   // Full-duplex transportation of PCM audio
   virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0;