summaryrefslogtreecommitdiff
path: root/image/ScriptedNotificationObserver.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2021-11-23 06:54:37 -0500
committerMatt A. Tobin <email@mattatobin.com>2021-11-23 06:54:37 -0500
commit6701e2062ce3aa8a4da305b82d9de9154d2bdc8e (patch)
tree252c28d5d6915fca94f21ad82d7c2d1af0661a85 /image/ScriptedNotificationObserver.cpp
parentb0e732d82b1195e35f31a097b00bf595f6271585 (diff)
downloadaura-central-6701e2062ce3aa8a4da305b82d9de9154d2bdc8e.tar.gz
Issue %3005 - Move image/ to system/
- Since the early days this has grown quite a bit and so won't be going to components or modules.. Best to just leave it as-is under system.
Diffstat (limited to 'image/ScriptedNotificationObserver.cpp')
-rw-r--r--image/ScriptedNotificationObserver.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/image/ScriptedNotificationObserver.cpp b/image/ScriptedNotificationObserver.cpp
deleted file mode 100644
index 3c7f05296..000000000
--- a/image/ScriptedNotificationObserver.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * 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 "ScriptedNotificationObserver.h"
-#include "imgIScriptedNotificationObserver.h"
-#include "nsCycleCollectionParticipant.h"
-
-namespace mozilla {
-namespace image {
-
-NS_IMPL_CYCLE_COLLECTION(ScriptedNotificationObserver, mInner)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ScriptedNotificationObserver)
- NS_INTERFACE_MAP_ENTRY(imgINotificationObserver)
- NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(ScriptedNotificationObserver)
-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) {
- return mInner->SizeAvailable(aRequest);
- }
- if (aType == imgINotificationObserver::FRAME_UPDATE) {
- return mInner->FrameUpdate(aRequest);
- }
- if (aType == imgINotificationObserver::FRAME_COMPLETE) {
- return mInner->FrameComplete(aRequest);
- }
- if (aType == imgINotificationObserver::DECODE_COMPLETE) {
- return mInner->DecodeComplete(aRequest);
- }
- if (aType == imgINotificationObserver::LOAD_COMPLETE) {
- return mInner->LoadComplete(aRequest);
- }
- if (aType == imgINotificationObserver::DISCARD) {
- return mInner->Discard(aRequest);
- }
- if (aType == imgINotificationObserver::IS_ANIMATED) {
- return mInner->IsAnimated(aRequest);
- }
- if (aType == imgINotificationObserver::HAS_TRANSPARENCY) {
- return mInner->HasTransparency(aRequest);
- }
- return NS_OK;
-}
-
-} // namespace image
-} // namespace mozilla