Bug 1102048 (Part 14, NotificationObserver) - Make image/src files comply with the Mozilla Coding Style Guide. r=seth

This commit is contained in:
Glenn Randers-Pehrson 2015-03-31 10:50:00 -07:00
parent a05253d19a
commit 311dffda45
2 changed files with 25 additions and 16 deletions

View File

@ -24,30 +24,37 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(ScriptedNotificationObserver)
ScriptedNotificationObserver::ScriptedNotificationObserver(
imgIScriptedNotificationObserver* aInner)
: mInner(aInner)
{
}
{ }
NS_IMETHODIMP
ScriptedNotificationObserver::Notify(imgIRequest* aRequest,
int32_t aType,
const nsIntRect* /*aUnused*/)
{
if (aType == imgINotificationObserver::SIZE_AVAILABLE)
if (aType == imgINotificationObserver::SIZE_AVAILABLE) {
return mInner->SizeAvailable(aRequest);
if (aType == imgINotificationObserver::FRAME_UPDATE)
}
if (aType == imgINotificationObserver::FRAME_UPDATE) {
return mInner->FrameUpdate(aRequest);
if (aType == imgINotificationObserver::FRAME_COMPLETE)
}
if (aType == imgINotificationObserver::FRAME_COMPLETE) {
return mInner->FrameComplete(aRequest);
if (aType == imgINotificationObserver::DECODE_COMPLETE)
}
if (aType == imgINotificationObserver::DECODE_COMPLETE) {
return mInner->DecodeComplete(aRequest);
if (aType == imgINotificationObserver::LOAD_COMPLETE)
}
if (aType == imgINotificationObserver::LOAD_COMPLETE) {
return mInner->LoadComplete(aRequest);
if (aType == imgINotificationObserver::DISCARD)
}
if (aType == imgINotificationObserver::DISCARD) {
return mInner->Discard(aRequest);
if (aType == imgINotificationObserver::IS_ANIMATED)
}
if (aType == imgINotificationObserver::IS_ANIMATED) {
return mInner->IsAnimated(aRequest);
if (aType == imgINotificationObserver::HAS_TRANSPARENCY)
}
if (aType == imgINotificationObserver::HAS_TRANSPARENCY) {
return mInner->HasTransparency(aRequest);
}
return NS_OK;
}

View File

@ -4,8 +4,8 @@
* 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/. */
#ifndef ScriptedNotificationObserver_h
#define ScriptedNotificationObserver_h
#ifndef mozilla_image_src_ScriptedNotificationObserver_h
#define mozilla_image_src_ScriptedNotificationObserver_h
#include "imgINotificationObserver.h"
#include "nsCOMPtr.h"
@ -19,17 +19,19 @@ namespace image {
class ScriptedNotificationObserver : public imgINotificationObserver
{
public:
explicit ScriptedNotificationObserver(imgIScriptedNotificationObserver* aInner);
explicit
ScriptedNotificationObserver(imgIScriptedNotificationObserver* aInner);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_IMGINOTIFICATIONOBSERVER
NS_DECL_CYCLE_COLLECTION_CLASS(ScriptedNotificationObserver)
private:
virtual ~ScriptedNotificationObserver() {}
virtual ~ScriptedNotificationObserver() { }
nsCOMPtr<imgIScriptedNotificationObserver> mInner;
};
}}
} // namespace image
} // namespace mozilla
#endif
#endif // mozilla_image_src_ScriptedNotificationObserver_h