|
1 /******************************************************************************* |
|
2 * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 |
|
13 #ifndef SWTBROWSERLINKRESOLVER_H |
|
14 #define SWTBROWSERLINKRESOLVER_H |
|
15 |
|
16 |
|
17 #include <brctllinkresolver.h> |
|
18 #include "eswt.h" |
|
19 |
|
20 |
|
21 class CBrCtlInterface; |
|
22 class CSwtBrowser; |
|
23 |
|
24 |
|
25 /** |
|
26 * CSwtBrowserLinkResolver |
|
27 * Handles resolving embedded links |
|
28 * This class is used to provide a callback mechanism for receiving the content of an embedded |
|
29 * link or the content of a user-initiated load request. |
|
30 * @lib eswt |
|
31 */ |
|
32 NONSHARABLE_CLASS(CSwtBrowserLinkResolver) |
|
33 : public CBase |
|
34 , public MBrCtlLinkResolver |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Constructor. |
|
39 * param aBrowser The pointer points to the browser |
|
40 * param aPeer The Java object associated with this C++ object |
|
41 */ |
|
42 CSwtBrowserLinkResolver(CSwtBrowser* aBorwser, TSwtPeer aPeer); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CSwtBrowserLinkResolver(); |
|
48 |
|
49 // From MBrCtlLinkResolver |
|
50 TBool ResolveEmbeddedLinkL(const TDesC& /*aEmbeddedUrl*/, const TDesC& /*aCurrentUrl*/, |
|
51 TBrCtlLoadContentType /*aLoadContentType*/, MBrCtlLinkContent& /*aEmbeddedLinkContent*/) ; |
|
52 TBool ResolveLinkL(const TDesC& aUrl, const TDesC& /*aCurrentUrl*/, |
|
53 MBrCtlLinkContent& /*aBrCtlLinkContent*/) ; |
|
54 void CancelAll() ; |
|
55 |
|
56 private: // data |
|
57 /** |
|
58 * Pointer to browser. |
|
59 * Not own |
|
60 */ |
|
61 CSwtBrowser *iBrowser; |
|
62 |
|
63 /** |
|
64 * Java side peer |
|
65 * Not own |
|
66 */ |
|
67 TSwtPeer iPeer; |
|
68 }; |
|
69 |
|
70 #endif // SWTBROWSERLINKRESOLVER_H |