image/decoders/icon/android/nsIconChannel.h

branch
TOR_BUG_9701
changeset 10
ac0c01689b40
equal deleted inserted replaced
-1:000000000000 0:99cf15e113d6
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
5
6 #ifndef nsIconChannel_h_
7 #define nsIconChannel_h_
8
9 #include "mozilla/Attributes.h"
10
11 #include "nsIChannel.h"
12 #include "nsIURI.h"
13 #include "nsIIconURI.h"
14 #include "nsCOMPtr.h"
15
16 /**
17 * This class is the Android implementation of nsIconChannel.
18 * It asks Android for an icon, and creates a new channel for
19 * that file to which all calls will be proxied.
20 */
21 class nsIconChannel MOZ_FINAL : public nsIChannel {
22 public:
23 NS_DECL_ISUPPORTS
24 NS_FORWARD_NSIREQUEST(mRealChannel->)
25 NS_FORWARD_NSICHANNEL(mRealChannel->)
26
27 nsIconChannel() {}
28 ~nsIconChannel() {}
29
30 /**
31 * Called by nsIconProtocolHandler after it creates this channel.
32 * Must be called before calling any other function on this object.
33 * If this method fails, no other function must be called on this object.
34 */
35 NS_HIDDEN_(nsresult) Init(nsIURI* aURI);
36 private:
37 /**
38 * The channel to the temp icon file (e.g. to /tmp/2qy9wjqw.html).
39 * Will always be non-null after a successful Init.
40 */
41 nsCOMPtr<nsIChannel> mRealChannel;
42 };
43
44 #endif

mercurial