equal
deleted
inserted
replaced
105 { |
105 { |
106 delete iFaviconHandler; |
106 delete iFaviconHandler; |
107 delete iIconIndexes; |
107 delete iIconIndexes; |
108 delete iItems; |
108 delete iItems; |
109 delete iNewState; |
109 delete iNewState; |
|
110 if(iIconUpdateCallback) iIconUpdateCallback->Cancel(); |
|
111 delete iIconUpdateCallback; |
110 |
112 |
111 if ( iFontItalic ) |
113 if ( iFontItalic ) |
112 { |
114 { |
113 CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() ); |
115 CWsScreenDevice& screenDev = *( CEikonEnv::Static()->ScreenDevice() ); |
114 screenDev.ReleaseFont( iFontItalic ); |
116 screenDev.ReleaseFont( iFontItalic ); |
142 // Ownership of aItems is taken, and will become a member (but not yet |
144 // Ownership of aItems is taken, and will become a member (but not yet |
143 // that) - push until then. |
145 // that) - push until then. |
144 CleanupStack::PushL( aItems ); |
146 CleanupStack::PushL( aItems ); |
145 |
147 |
146 // Get all favicons asynchronously by iteration on icon array |
148 // Get all favicons asynchronously by iteration on icon array |
|
149 /* TODO: There should a callback from engine when favIcon are decode |
|
150 otherwise it takes some redundant calls to engine in order to get |
|
151 the favIcons to UI. */ |
|
152 #ifdef BRDO_PERF_IMPROVEMENTS_ENABLED_FF |
|
153 if(iApiProvider.StartedUp()) |
|
154 UpdateFavIconsL(); |
|
155 #else |
147 iFaviconHandler->StartGetFaviconsL( aItems ); |
156 iFaviconHandler->StartGetFaviconsL( aItems ); |
|
157 #endif |
|
158 |
148 |
159 |
149 // Get icon indexes into new list. Replace the existing |
160 // Get icon indexes into new list. Replace the existing |
150 // data only if successfully gotten. This ensures that they don't go out |
161 // data only if successfully gotten. This ensures that they don't go out |
151 // of sync (there cannot be different number of items in the two list). |
162 // of sync (there cannot be different number of items in the two list). |
152 CBrowserFavouritesIconIndexArray* newIconIndexes = |
163 CBrowserFavouritesIconIndexArray* newIconIndexes = |
184 SetStateL( *iNewState ); |
195 SetStateL( *iNewState ); |
185 delete iNewState; |
196 delete iNewState; |
186 iNewState = NULL; |
197 iNewState = NULL; |
187 } |
198 } |
188 } |
199 } |
|
200 |
|
201 // --------------------------------------------------------- |
|
202 // CBrowserFavouritesListbox::UpdateFavIcons |
|
203 // --------------------------------------------------------- |
|
204 // |
|
205 void CBrowserFavouritesListbox::UpdateFavIconsL() |
|
206 { |
|
207 if(iIconUpdateCallback) |
|
208 iIconUpdateCallback->Cancel(); |
|
209 else |
|
210 iIconUpdateCallback = CIdle::NewL(CActive::EPriorityIdle); |
|
211 |
|
212 iFaviconHandler->RequestFavicons(iItems); |
|
213 iIconUpdateCallback->Start(TCallBack(UpdateFavIconsCallback, this)); |
|
214 } |
|
215 |
|
216 // ---------------------------------------------------------------------------- |
|
217 // CBrowserBookmarksView::CompleteAppInitCallback |
|
218 // ---------------------------------------------------------------------------- |
|
219 // |
|
220 TInt CBrowserFavouritesListbox::UpdateFavIconsCallback( TAny* aParam ) |
|
221 { |
|
222 CBrowserFavouritesListbox *favListBox = STATIC_CAST(CBrowserFavouritesListbox*, aParam); |
|
223 TRAP_IGNORE( (favListBox->iFaviconHandler->StartGetFaviconsL(favListBox->iItems)) ) |
|
224 return EFalse; |
|
225 } |
|
226 |
189 |
227 |
190 // --------------------------------------------------------- |
228 // --------------------------------------------------------- |
191 // CBrowserFavouritesListbox::DrawFavicons |
229 // CBrowserFavouritesListbox::DrawFavicons |
192 // --------------------------------------------------------- |
230 // --------------------------------------------------------- |
193 // |
231 // |