LCOV - code coverage report
Current view: directory - image/decoders/icon - nsIconModule.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 4 4 100.0 %
Date: 2012-06-02 Functions: 2 2 100.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
       2                 :  *
       3                 :  * ***** BEGIN LICENSE BLOCK *****
       4                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       5                 :  *
       6                 :  * The contents of this file are subject to the Mozilla Public License Version
       7                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       8                 :  * the License. You may obtain a copy of the License at
       9                 :  * http://www.mozilla.org/MPL/
      10                 :  *
      11                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      12                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      13                 :  * for the specific language governing rights and limitations under the
      14                 :  * License.
      15                 :  *
      16                 :  * The Original Code is mozilla.org code.
      17                 :  *
      18                 :  * The Initial Developer of the Original Code is
      19                 :  * Netscape Communications Corporation.
      20                 :  * Portions created by the Initial Developer are Copyright (C) 2001
      21                 :  * the Initial Developer. All Rights Reserved.
      22                 :  *
      23                 :  * Contributor(s):
      24                 :  *   Scott MacGregor <mscott@netscape.com>
      25                 :  *
      26                 :  * Alternatively, the contents of this file may be used under the terms of
      27                 :  * either the GNU General Public License Version 2 or later (the "GPL"), or
      28                 :  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      29                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      30                 :  * of those above. If you wish to allow use of your version of this file only
      31                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      32                 :  * use your version of this file under the terms of the MPL, indicate your
      33                 :  * decision by deleting the provisions above and replace them with the notice
      34                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      35                 :  * the provisions above, a recipient may use your version of this file under
      36                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      37                 :  *
      38                 :  * ***** END LICENSE BLOCK ***** */
      39                 : 
      40                 : #include "mozilla/ModuleUtils.h"
      41                 : #include "nsServiceManagerUtils.h"
      42                 : 
      43                 : #include "nsIconProtocolHandler.h"
      44                 : #include "nsIconURI.h"
      45                 : #include "nsIconChannel.h"
      46                 : 
      47                 : // objects that just require generic constructors
      48                 : /******************************************************************************
      49                 :  * Protocol CIDs
      50                 :  */
      51                 : #define NS_ICONPROTOCOL_CID   { 0xd0f9db12, 0x249c, 0x11d5, { 0x99, 0x5, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } } 
      52                 : 
      53            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsIconProtocolHandler)
      54                 : 
      55                 : NS_DEFINE_NAMED_CID(NS_ICONPROTOCOL_CID);
      56                 : 
      57                 : static const mozilla::Module::CIDEntry kIconCIDs[] = {
      58                 :   { &kNS_ICONPROTOCOL_CID, false, NULL, nsIconProtocolHandlerConstructor },
      59                 :   { NULL }
      60                 : };
      61                 : 
      62                 : static const mozilla::Module::ContractIDEntry kIconContracts[] = {
      63                 :   { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-icon", &kNS_ICONPROTOCOL_CID },
      64                 :   { NULL }
      65                 : };
      66                 : 
      67                 : static const mozilla::Module::CategoryEntry kIconCategories[] = {
      68                 :   { NULL }
      69                 : };
      70                 : 
      71                 : static void
      72            1419 : IconDecoderModuleDtor()
      73                 : {
      74                 : #ifdef MOZ_WIDGET_GTK2
      75            1419 :   nsIconChannel::Shutdown();
      76                 : #endif
      77            1419 : }
      78                 : 
      79                 : static const mozilla::Module kIconModule = {
      80                 :   mozilla::Module::kVersion,
      81                 :   kIconCIDs,
      82                 :   kIconContracts,
      83                 :   kIconCategories,
      84                 :   NULL,
      85                 :   NULL,
      86                 :   IconDecoderModuleDtor
      87                 : };
      88                 : 
      89                 : NSMODULE_DEFN(nsIconDecoderModule) = &kIconModule;

Generated by: LCOV version 1.7