46 |
46 |
47 HttpUiCallbacks::HttpUiCallbacks() |
47 HttpUiCallbacks::HttpUiCallbacks() |
48 { |
48 { |
49 m_error = KErrNone; |
49 m_error = KErrNone; |
50 m_scheduler = NULL; |
50 m_scheduler = NULL; |
|
51 m_brctl = NULL; |
51 } |
52 } |
52 |
53 |
53 HttpUiCallbacks::~HttpUiCallbacks() |
54 HttpUiCallbacks::~HttpUiCallbacks() |
54 { |
55 { |
55 if (m_scheduler) { |
56 if (m_scheduler) { |
56 m_scheduler->Cancel(); |
57 m_scheduler->Cancel(); |
57 delete m_scheduler; |
58 delete m_scheduler; |
58 } |
59 } |
|
60 m_brctl = NULL; |
|
61 } |
|
62 |
|
63 void HttpUiCallbacks::SetBrowserControl(CBrCtl* aBrctl) |
|
64 { |
|
65 m_brctl = aBrctl; |
59 } |
66 } |
60 |
67 |
61 TInt HttpUiCallbacks::handleErrorCb(TAny* aPtr) |
68 TInt HttpUiCallbacks::handleErrorCb(TAny* aPtr) |
62 { |
69 { |
63 HttpUiCallbacks* self = static_cast<HttpUiCallbacks*>(aPtr); |
70 HttpUiCallbacks* self = static_cast<HttpUiCallbacks*>(aPtr); |
77 TInt HttpUiCallbacks::CreateConnection(TInt* aConnectionPtr, TInt* aSockSvrHandle, |
84 TInt HttpUiCallbacks::CreateConnection(TInt* aConnectionPtr, TInt* aSockSvrHandle, |
78 TBool* aNewConn, TApBearerType* aBearerType) |
85 TBool* aNewConn, TApBearerType* aBearerType) |
79 { |
86 { |
80 TInt error = KErrNone; |
87 TInt error = KErrNone; |
81 if( aConnectionPtr && aSockSvrHandle && aNewConn ){ |
88 if( aConnectionPtr && aSockSvrHandle && aNewConn ){ |
82 TRAP(error, brctl()->brCtlSpecialLoadObserver()->NetworkConnectionNeededL(aConnectionPtr, aSockSvrHandle, aNewConn, aBearerType)); |
89 if(m_brctl && m_brctl->webView()->widgetExtension()){ |
|
90 TRAP(error, m_brctl->brCtlSpecialLoadObserver()->NetworkConnectionNeededL(aConnectionPtr, aSockSvrHandle, aNewConn, aBearerType)); |
|
91 } |
|
92 else |
|
93 { |
|
94 TRAP(error, brctl()->brCtlSpecialLoadObserver()->NetworkConnectionNeededL(aConnectionPtr, aSockSvrHandle, aNewConn, aBearerType)); |
|
95 } |
|
96 |
83 if( error == KErrNone && *aConnectionPtr ) { |
97 if( error == KErrNone && *aConnectionPtr ) { |
84 RConnection* connPtr = REINTERPRET_CAST( RConnection*, *aConnectionPtr ); |
98 RConnection* connPtr = REINTERPRET_CAST( RConnection*, *aConnectionPtr ); |
85 TConnectionInfoBuf connInfoBuf; |
99 TConnectionInfoBuf connInfoBuf; |
86 TUint conns( 0 ); |
100 TUint conns( 0 ); |
87 connPtr->EnumerateConnections( conns ); |
101 connPtr->EnumerateConnections( conns ); |