GMPCallbackBase.h (778B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef GMPCallbackBase_h_ 7 #define GMPCallbackBase_h_ 8 9 #include "nsISupportsImpl.h" 10 11 class GMPCallbackBase { 12 public: 13 NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING 14 15 virtual ~GMPCallbackBase() = default; 16 17 // The GMP code will call this if the codec crashes or shuts down. It's 18 // expected that the consumer (destination of this callback) will respond 19 // by dropping their reference to the proxy, allowing the proxy/parent to 20 // be destroyed. 21 virtual void Terminated() = 0; 22 }; 23 24 #endif