зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1339733 - Move GMPCrashHelperHolder implementation into its own .cpp file. r=jwwang
This means we don't need to include GMPService.h in GMPCrashHelperHolder.h, in order to use the GMPService inside GMPCrashHelperHolder. This which prevents an inclusion cycle between GMPService.h and GMPCrashHelperHolder.h in another patch I'm working on. MozReview-Commit-ID: AbcXvv4UMyl --HG-- extra : rebase_source : bdae6e1fbbbe8ce4100f51d2339f69c23f12859f
This commit is contained in:
Родитель
613e459869
Коммит
d29f094da0
|
@ -0,0 +1,36 @@
|
|||
/* -*- 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/. */
|
||||
|
||||
#include "GMPCrashHelperHolder.h"
|
||||
#include "GMPService.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "mozilla/ipc/ProtocolUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
void
|
||||
GMPCrashHelperHolder::SetCrashHelper(GMPCrashHelper* aHelper)
|
||||
{
|
||||
mCrashHelper = aHelper;
|
||||
}
|
||||
|
||||
GMPCrashHelper*
|
||||
GMPCrashHelperHolder::GetCrashHelper()
|
||||
{
|
||||
return mCrashHelper;
|
||||
}
|
||||
|
||||
void
|
||||
GMPCrashHelperHolder::MaybeDisconnect(bool aAbnormalShutdown)
|
||||
{
|
||||
if (!aAbnormalShutdown) {
|
||||
RefPtr<gmp::GeckoMediaPluginService> service(gmp::GeckoMediaPluginService::GetGeckoMediaPluginService());
|
||||
service->DisconnectCrashHelper(GetCrashHelper());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
|
@ -6,11 +6,6 @@
|
|||
#ifndef GMPCrashHelperHolder_h_
|
||||
#define GMPCrashHelperHolder_h_
|
||||
|
||||
#include "GMPService.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "mozilla/ipc/ProtocolUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class GMPCrashHelper;
|
||||
|
@ -54,23 +49,11 @@ class GMPCrashHelperHolder
|
|||
{
|
||||
public:
|
||||
|
||||
void SetCrashHelper(GMPCrashHelper* aHelper)
|
||||
{
|
||||
mCrashHelper = aHelper;
|
||||
}
|
||||
void SetCrashHelper(GMPCrashHelper* aHelper);
|
||||
|
||||
GMPCrashHelper* GetCrashHelper()
|
||||
{
|
||||
return mCrashHelper;
|
||||
}
|
||||
GMPCrashHelper* GetCrashHelper();
|
||||
|
||||
void MaybeDisconnect(bool aAbnormalShutdown)
|
||||
{
|
||||
if (!aAbnormalShutdown) {
|
||||
RefPtr<gmp::GeckoMediaPluginService> service(gmp::GeckoMediaPluginService::GetGeckoMediaPluginService());
|
||||
service->DisconnectCrashHelper(GetCrashHelper());
|
||||
}
|
||||
}
|
||||
void MaybeDisconnect(bool aAbnormalShutdown);
|
||||
|
||||
private:
|
||||
RefPtr<GMPCrashHelper> mCrashHelper;
|
||||
|
|
|
@ -73,6 +73,7 @@ UNIFIED_SOURCES += [
|
|||
'GMPContentChild.cpp',
|
||||
'GMPContentParent.cpp',
|
||||
'GMPCrashHelper.cpp',
|
||||
'GMPCrashHelperHolder.cpp',
|
||||
'GMPDecryptorChild.cpp',
|
||||
'GMPDecryptorParent.cpp',
|
||||
'GMPDiskStorage.cpp',
|
||||
|
|
Загрузка…
Ссылка в новой задаче