Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 : * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "GMPCrashHelperHolder.h"
8 : #include "GMPService.h"
9 : #include "mozilla/RefPtr.h"
10 : #include "nsPIDOMWindow.h"
11 : #include "mozilla/ipc/ProtocolUtils.h"
12 :
13 : namespace mozilla {
14 :
15 : void
16 0 : GMPCrashHelperHolder::SetCrashHelper(GMPCrashHelper* aHelper)
17 : {
18 0 : mCrashHelper = aHelper;
19 0 : }
20 :
21 : GMPCrashHelper*
22 0 : GMPCrashHelperHolder::GetCrashHelper()
23 : {
24 0 : return mCrashHelper;
25 : }
26 :
27 : void
28 0 : GMPCrashHelperHolder::MaybeDisconnect(bool aAbnormalShutdown)
29 : {
30 0 : if (!aAbnormalShutdown) {
31 0 : RefPtr<gmp::GeckoMediaPluginService> service(gmp::GeckoMediaPluginService::GetGeckoMediaPluginService());
32 0 : service->DisconnectCrashHelper(GetCrashHelper());
33 : }
34 0 : }
35 :
36 : } // namespace mozilla
|