content/base/src/nsStubDocumentObserver.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /*
     7  * nsStubDocumentObserver is an implementation of the nsIDocumentObserver
     8  * interface (except for the methods on nsISupports) that is intended to be
     9  * used as a base class within the content/layout library.  All methods do
    10  * nothing.
    11  */
    13 #ifndef nsStubDocumentObserver_h_
    14 #define nsStubDocumentObserver_h_
    16 #include "nsIDocumentObserver.h"
    18 /**
    19  * There are two advantages to inheriting from nsStubDocumentObserver
    20  * rather than directly from nsIDocumentObserver:
    21  *  1. smaller compiled code size (since there's no need for the code
    22  *     for the empty virtual function implementations for every
    23  *     nsIDocumentObserver implementation)
    24  *  2. the performance of document's loop over observers benefits from
    25  *     the fact that more of the functions called are the same (which
    26  *     can reduce instruction cache misses and perhaps improve branch
    27  *     prediction)
    28  */
    29 class nsStubDocumentObserver : public nsIDocumentObserver {
    30 public:
    31   NS_DECL_NSIDOCUMENTOBSERVER
    32 };
    34 #endif /* !defined(nsStubDocumentObserver_h_) */

mercurial