2009-09-08 14:22:50 -07:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
|
|
|
|
/* vim: set sw=2 ts=2 et : */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2009-09-08 14:22:50 -07:00
|
|
|
|
|
|
|
#ifndef mozilla_plugins_StreamNotifyParent_h
|
|
|
|
#define mozilla_plugins_StreamNotifyParent_h
|
|
|
|
|
|
|
|
#include "mozilla/plugins/PStreamNotifyParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace plugins {
|
|
|
|
|
|
|
|
class StreamNotifyParent : public PStreamNotifyParent
|
|
|
|
{
|
|
|
|
friend class PluginInstanceParent;
|
|
|
|
|
2010-01-05 09:12:30 -08:00
|
|
|
StreamNotifyParent()
|
|
|
|
: mDestructionFlag(NULL)
|
|
|
|
{ }
|
|
|
|
~StreamNotifyParent() {
|
|
|
|
if (mDestructionFlag)
|
|
|
|
*mDestructionFlag = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
// If we are destroyed within the call to NPN_GetURLNotify, notify the caller
|
|
|
|
// so that we aren't destroyed again. see bug 536437.
|
|
|
|
void SetDestructionFlag(bool* flag) {
|
|
|
|
mDestructionFlag = flag;
|
|
|
|
}
|
|
|
|
void ClearDestructionFlag() {
|
|
|
|
mDestructionFlag = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2011-01-05 11:44:21 -08:00
|
|
|
bool RecvRedirectNotifyResponse(const bool& allow);
|
|
|
|
|
2010-01-05 09:12:30 -08:00
|
|
|
bool* mDestructionFlag;
|
2009-09-08 14:22:50 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace plugins
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|