|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Browser content view |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include <BrCtlDefs.h> |
|
24 #include <BrCtlInterface.h> |
|
25 |
|
26 #include "BrowserWindow.h" |
|
27 #include "BrowserContentView.h" |
|
28 #include "BrowserContentViewContainer.h" |
|
29 #include "BrowserDialogsProvider.h" |
|
30 #include "BrowserDialogsProviderProxy.h" |
|
31 #include "BrowserSoftkeysObserver.h" |
|
32 #include "BrowserSpecialLoadObserver.h" |
|
33 #include "BrowserWindowManager.h" |
|
34 |
|
35 #include "ApiProvider.h" |
|
36 #include "BrowserAppUi.h" |
|
37 #include "BrowserUIVariant.hrh" |
|
38 #include "Logger.h" |
|
39 #include "BrowserDisplay.h" |
|
40 #include "BrowserPopupEngine.h" |
|
41 #include <CDownloadMgrUiDownloadsList.h> |
|
42 #include <DownloadMgrClient.h> |
|
43 |
|
44 // for instantiating BrCtlInterface |
|
45 #include "CommonConstants.h" |
|
46 #include "BrowserApplication.h" |
|
47 #include "BrowserAppDocument.h" |
|
48 |
|
49 #include "Preferences.h" |
|
50 |
|
51 // for dialog notes |
|
52 #include <StringLoader.h> |
|
53 #include <BrowserNG.rsg> |
|
54 #include "BrowserDialogs.h" |
|
55 |
|
56 |
|
57 #define CALL_ORIG iWindowManager->ApiProvider()-> |
|
58 |
|
59 TBool CBrowserWindow::iIsPageOverviewSupportQueried = EFalse; |
|
60 TBool CBrowserWindow::iIsPageOverviewSupported = EFalse; |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // CBrowserWindow::NewLC() |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 CBrowserWindow* CBrowserWindow::NewLC( |
|
67 TInt aWindowId, |
|
68 const TDesC* aTargetName, |
|
69 CBrowserWindowManager* aWindowMgr ) |
|
70 { |
|
71 CBrowserWindow* self = new (ELeave) |
|
72 CBrowserWindow( aWindowId, aTargetName, aWindowMgr ); |
|
73 CleanupStack::PushL( self ); |
|
74 self->ConstructL(); |
|
75 return self; |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // CBrowserWindow::NewL() |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 CBrowserWindow* CBrowserWindow::NewL( |
|
83 TInt aWindowId, |
|
84 const TDesC* aTargetName, |
|
85 CBrowserWindowManager* aWindowMgr ) |
|
86 { |
|
87 CBrowserWindow* self = |
|
88 CBrowserWindow::NewLC( aWindowId, aTargetName, aWindowMgr ); |
|
89 CleanupStack::Pop( self ); |
|
90 return self; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CBrowserWindow::~CBrowserWindow() |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 CBrowserWindow::~CBrowserWindow() |
|
98 { |
|
99 iClosing = ETrue; |
|
100 |
|
101 LOG_ENTERFN("CBrowserWindow::~CBrowserWindow"); |
|
102 BROWSER_LOG( ( _L( "window id: %d" ), WindowId() ) ); |
|
103 |
|
104 if( iBrCtlInterface ) |
|
105 { |
|
106 iBrCtlInterface->RemoveLoadEventObserver( iLoadObserver ); |
|
107 BROWSER_LOG( ( _L( " RemoveLoadEventObserver" ) ) ); |
|
108 |
|
109 CBrowserContentView* cv = iWindowManager->ContentView(); |
|
110 iBrCtlInterface->RemoveStateChangeObserver( cv ); |
|
111 BROWSER_LOG( ( _L( " RemoveStateChangeObserver" ) ) ); |
|
112 iBrCtlInterface->RemoveCommandObserver( cv ); |
|
113 BROWSER_LOG( ( _L( " RemoveCommandObserver" ) ) ); |
|
114 |
|
115 |
|
116 // TRAP_IGNORE( iBrCtlInterface->HandleCommandL( |
|
117 // (TInt)TBrCtlDefs::ECommandCancelFetch + (TInt)TBrCtlDefs::ECommandIdBase ) ); |
|
118 BROWSER_LOG( ( _L( " HandleCommandL" ) ) ); |
|
119 } |
|
120 |
|
121 // security indicator must be set off. |
|
122 if( iDisplay && !iWindowManager->ApiProvider()-> |
|
123 Preferences().HttpSecurityWarningsStatSupressed() ) |
|
124 { |
|
125 BROWSER_LOG( ( _L( " UpdateSecureIndicatorL 1" ) ) ); |
|
126 TRAP_IGNORE( iDisplay->UpdateSecureIndicatorL( EAknIndicatorStateOff ) ); |
|
127 BROWSER_LOG( ( _L( " UpdateSecureIndicatorL 2" ) ) ); |
|
128 // we cannot do much here if error occurs... application is closing anyway |
|
129 } |
|
130 delete iDisplay; |
|
131 BROWSER_LOG( ( _L( " Display deleted.") ) ); |
|
132 |
|
133 //Delete iBrCtlInterface before observers. If this is not |
|
134 //done then browser crashes on exit when page is being loaded. |
|
135 delete iBrCtlInterface; |
|
136 BROWSER_LOG( ( _L( " BrCtlInterface deleted.") ) ); |
|
137 |
|
138 delete iLoadObserver; |
|
139 BROWSER_LOG( ( _L( " LoadObserver deleted.") ) ); |
|
140 |
|
141 delete iDialogsProviderProxy; |
|
142 BROWSER_LOG( ( _L( " DialogsProviderProxy deleted.") ) ); |
|
143 |
|
144 delete iSpecialLoadObserver; |
|
145 BROWSER_LOG( ( _L( " SpecialLoadObserver deleted.") ) ); |
|
146 |
|
147 delete iSoftkeysObserver; |
|
148 BROWSER_LOG( ( _L( " SoftkeysObserver deleted.") ) ); |
|
149 // |
|
150 delete iTargetName; |
|
151 } |
|
152 |
|
153 // ----------------------------------------------------------------------------- |
|
154 // CBrowserWindow::CBrowserWindow() |
|
155 // ----------------------------------------------------------------------------- |
|
156 // |
|
157 CBrowserWindow::CBrowserWindow( |
|
158 TInt aWindowId, |
|
159 const TDesC* aTargetName, |
|
160 CBrowserWindowManager* aWindowMgr ) : |
|
161 iWindowId( aWindowId ), |
|
162 iActive( EFalse ), |
|
163 iFirstPage(ETrue), |
|
164 iBrCtlInterface( NULL ), |
|
165 iDialogsProviderProxy( NULL ), |
|
166 iDisplay( NULL ), |
|
167 iLoadObserver( NULL ), |
|
168 iSoftkeysObserver( NULL ), |
|
169 iSpecialLoadObserver( NULL ), |
|
170 iWindowManager( aWindowMgr ) |
|
171 { |
|
172 __ASSERT_DEBUG( (aTargetName != NULL), Util::Panic( Util::EUninitializedData )); |
|
173 iTargetName = aTargetName->Alloc(); |
|
174 } |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // CBrowserWindow::ConstructL() |
|
178 // ----------------------------------------------------------------------------- |
|
179 // |
|
180 void CBrowserWindow::ConstructL() |
|
181 { |
|
182 PERFLOG_LOCAL_INIT |
|
183 LOG_ENTERFN("CBrowserWindow::ConstructL"); |
|
184 MApiProvider* api = iWindowManager->ApiProvider(); |
|
185 CleanupStack::PushL( api ); |
|
186 PERFLOG_STOPWATCH_START |
|
187 iDisplay = CBrowserDisplay::NewL( *this, *this ); |
|
188 PERFLOG_STOP_WRITE("*BrowserDisplay*") |
|
189 BROWSER_LOG( ( _L( " Multiple Display up" ) ) ); |
|
190 |
|
191 CBrowserContentView* cv = iWindowManager->ContentView(); |
|
192 TRect rect = cv->Container()->Rect(); |
|
193 |
|
194 PERFLOG_STOPWATCH_START |
|
195 iLoadObserver = CBrowserLoadObserver::NewL( *this, *cv, *this ); |
|
196 BROWSER_LOG( ( _L( " Multiple LoadObserver up" ) ) ); |
|
197 PERFLOG_STOP_WRITE("*LoadObs*") |
|
198 PERFLOG_STOPWATCH_START |
|
199 iDialogsProviderProxy = CBrowserDialogsProviderProxy::NewL( |
|
200 api->DialogsProvider(), iLoadObserver, *this ); |
|
201 PERFLOG_STOP_WRITE("*DlgProxy*") |
|
202 BROWSER_LOG( ( _L( " Multiple CBrowserDialogsProviderProxy UP" ) ) ); |
|
203 PERFLOG_STOPWATCH_START |
|
204 iSoftkeysObserver = CBrowserSoftkeysObserver::NewL( *this ); |
|
205 BROWSER_LOG( ( _L( " Multiple SoftkeyObserver up" ) ) ); |
|
206 PERFLOG_STOP_WRITE("*SoftKeyObs*") |
|
207 PERFLOG_STOPWATCH_START |
|
208 iSpecialLoadObserver = CBrowserSpecialLoadObserver::NewL( |
|
209 *this, this, CBrowserAppUi::Static()->Document(), cv ); |
|
210 PERFLOG_STOP_WRITE("*SoftKeyObs*") |
|
211 BROWSER_LOG( ( _L( " Multiple SpecialLoadObserver up" ) ) ); |
|
212 |
|
213 TInt autoLaunch( TBrCtlDefs::ECapabilityLaunchViewer ); |
|
214 CBrowserAppDocument* doc = STATIC_CAST( CBrowserAppDocument*, |
|
215 CBrowserAppUi::Static()->Document() ); |
|
216 |
|
217 if( doc->IsContentHandlerRegistered() ) |
|
218 { |
|
219 autoLaunch = 0; |
|
220 } |
|
221 |
|
222 PERFLOG_STOPWATCH_START |
|
223 TUint capabilityFlags = ( TBrCtlDefs::ECapabilityLoadHttpFw | |
|
224 TBrCtlDefs::ECapabilityDisplayScrollBar | |
|
225 TBrCtlDefs::ECapabilityConfirmDownloads | |
|
226 TBrCtlDefs::ECapabilitySavedPage | |
|
227 TBrCtlDefs::ECapabilityUseDlMgr | |
|
228 TBrCtlDefs::ECapabilityCursorNavigation | |
|
229 TBrCtlDefs::ECapabilityFavicon | |
|
230 TBrCtlDefs::ECapabilityToolBar | |
|
231 TBrCtlDefs::ECapabilityFitToScreen | |
|
232 autoLaunch ); |
|
233 |
|
234 if ( Preferences().UiLocalFeatureSupported( KBrowserGraphicalPage )) |
|
235 { |
|
236 capabilityFlags = capabilityFlags | TBrCtlDefs::ECapabilityGraphicalPage; |
|
237 } |
|
238 if ( Preferences().UiLocalFeatureSupported( KBrowserGraphicalPage ) && |
|
239 Preferences().UiLocalFeatureSupported( KBrowserGraphicalHistory )) |
|
240 { |
|
241 capabilityFlags = capabilityFlags | TBrCtlDefs::ECapabilityGraphicalHistory; |
|
242 } |
|
243 if ( Preferences().UiLocalFeatureSupported( KBrowserAutoFormFill ) ) |
|
244 { |
|
245 capabilityFlags = capabilityFlags | TBrCtlDefs::ECapabilityAutoFormFill; |
|
246 } |
|
247 if (Preferences().AccessKeys()) |
|
248 { |
|
249 capabilityFlags = capabilityFlags | TBrCtlDefs::ECapabilityAccessKeys; |
|
250 } |
|
251 |
|
252 iBrCtlInterface = CreateBrowserControlL( |
|
253 (CCoeControl*)cv->Container(), // parent control |
|
254 rect, // client rect |
|
255 capabilityFlags, // capabilities |
|
256 (TUint)TBrCtlDefs::ECommandIdBase, // command base |
|
257 iSoftkeysObserver, |
|
258 (MBrCtlLinkResolver*)NULL, // LinkResolver |
|
259 iSpecialLoadObserver, |
|
260 (MBrCtlLayoutObserver*)NULL, // Layout Observer |
|
261 iDialogsProviderProxy, |
|
262 this // Window Observer |
|
263 ); |
|
264 BROWSER_LOG( ( _L( " Multiple Plugin Br Control up, Kimono." ) ) ); |
|
265 |
|
266 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsLaunchAppUid, KUidBrowserApplication.iUid); |
|
267 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsLaunchViewId, KUidBrowserBookmarksViewId.iUid); |
|
268 iBrCtlInterface->SetBrowserSettingL(TBrCtlDefs::ESettingsLaunchCustomMessageId, KUidCustomMsgDownloadsList.iUid ); |
|
269 BROWSER_LOG( ( _L( " LaunchSettings are passed." ) ) ); |
|
270 |
|
271 #if defined( __RSS_FEEDS ) |
|
272 TPtrC rssMimeTypes = api->FeedsClientUtilities().SupportedMimeTypesL(); |
|
273 BROWSER_LOG( ( _L( " rss SupportedMimeTypes OK" ) ) ); |
|
274 TPtrC selfDownloadContentTypes = api->Preferences().SelfDownloadContentTypesL(); |
|
275 BROWSER_LOG( ( _L( " SelfDownloadContentTypesL OK" ) ) ); |
|
276 |
|
277 HBufC* buf = HBufC::NewLC( |
|
278 rssMimeTypes.Length() + selfDownloadContentTypes.Length() + 2 ); |
|
279 TPtr ptr( buf->Des() ); |
|
280 ptr.Append( rssMimeTypes ); |
|
281 ptr.Append( TChar(';') ); |
|
282 ptr.Append( selfDownloadContentTypes ); |
|
283 ptr.ZeroTerminate(); |
|
284 |
|
285 iBrCtlInterface->SetSelfDownloadContentTypesL( ptr ); |
|
286 CleanupStack::PopAndDestroy(); // buf |
|
287 #else // __RSS_FEEDS |
|
288 TPtrC selfDownloadContentTypes = api->Preferences().SelfDownloadContentTypesL(); |
|
289 BROWSER_LOG( ( _L( " SelfDownloadContentTypesL OK" ) ) ); |
|
290 iBrCtlInterface->SetSelfDownloadContentTypesL( selfDownloadContentTypes ); |
|
291 #endif // __RSS_FEEDS |
|
292 BROWSER_LOG( ( _L( " SetSelfDownloadContentTypesL") ) ); |
|
293 |
|
294 iBrCtlInterface->AddLoadEventObserverL( iLoadObserver ); |
|
295 BROWSER_LOG( ( _L( " AddLoadEventObserverL") ) ); |
|
296 iBrCtlInterface->AddStateChangeObserverL( cv ); |
|
297 BROWSER_LOG( ( _L( " AddStateChangeObserverL") ) ); |
|
298 iBrCtlInterface->AddCommandObserverL( cv ); |
|
299 BROWSER_LOG( ( _L( " AddCommandObserverL") ) ); |
|
300 |
|
301 // Window is not added as PreferencesObserver, |
|
302 // this message flow is controlled by the WindowManager. |
|
303 |
|
304 // Each window needs to notify its Browser Control of the settings |
|
305 PERFLOG_STOP_WRITE("***BctlItem creation***") |
|
306 PERFLOG_STOPWATCH_START |
|
307 InitialiseLocalPreferencesL(); |
|
308 UpdateBrCtlSettingsL(); |
|
309 PERFLOG_STOP_WRITE("***BrowserCtl Settings update***") |
|
310 CleanupStack::Pop( api ); |
|
311 |
|
312 iIsPageOverviewOn = iWindowManager->ApiProvider()->Preferences().PageOverview(); |
|
313 |
|
314 } |
|
315 |
|
316 // ----------------------------------------------------------------------------- |
|
317 // CBrowserWindow::OpenWindowL() |
|
318 // ----------------------------------------------------------------------------- |
|
319 // |
|
320 CBrCtlInterface* CBrowserWindow::OpenWindowL( |
|
321 TDesC& /* aUrl */, TDesC* aTargetName, |
|
322 TBool aUserInitiated, TAny* /* aReserved */ ) |
|
323 { |
|
324 // do not create new window when the browser is being closed |
|
325 if( iClosing ) |
|
326 { |
|
327 return NULL; |
|
328 } |
|
329 LOG_ENTERFN("CBrowserWindow::OpenWindowL, OSS"); |
|
330 // Do not exceed the maximum number of windows allowed |
|
331 if ( iWindowManager->WindowCount() == |
|
332 iWindowManager->MaxWindowCount() ) |
|
333 { |
|
334 |
|
335 // Show warning to user |
|
336 TBrowserDialogs::ErrorNoteL( R_BROWSER_NOTE_MAX_WINDOWS ); |
|
337 |
|
338 return NULL; |
|
339 } |
|
340 |
|
341 CBrCtlInterface* retVal( NULL ); |
|
342 TBool loadUrl( EFalse ); // allow fetching of url |
|
343 |
|
344 CBrowserPopupEngine* popup = &( iWindowManager->ApiProvider()->PopupEngine() ); |
|
345 // embedded mode doesn't allow multiple windows feature, hence popup object is NULL |
|
346 if (!popup) { |
|
347 return retVal; |
|
348 } |
|
349 |
|
350 HBufC* url = BrCtlInterface().PageInfoLC( TBrCtlDefs::EPageInfoUrl ); |
|
351 if(!url) |
|
352 { |
|
353 //The url is already pushed on to the cleanup stack and we have the ownership of it. Pop it. |
|
354 CleanupStack::Pop(url); |
|
355 return NULL; |
|
356 } |
|
357 |
|
358 TPtrC ptr( url->Des() ); |
|
359 |
|
360 // Check if on the whitelist, if not a user initiated open |
|
361 // or if pop-up blocking has been disabled |
|
362 if ( !( iWindowManager->ApiProvider()->Preferences().PopupBlocking() ) || |
|
363 popup->IsUrlOnWhiteListL( ptr ) || |
|
364 aUserInitiated ) |
|
365 { |
|
366 loadUrl = ETrue; // OK to fetch the URL |
|
367 } |
|
368 else |
|
369 { |
|
370 // Notify user that popup was blocked |
|
371 HBufC* popupBlocked = StringLoader::LoadLC( |
|
372 R_BROWSER_NOTE_POPUP_BLOCKED ); |
|
373 iWindowManager->ApiProvider()-> |
|
374 DialogsProvider().ShowTooltipL( *popupBlocked ); |
|
375 |
|
376 CleanupStack::PopAndDestroy( popupBlocked ); |
|
377 } |
|
378 |
|
379 CleanupStack::PopAndDestroy( url ); |
|
380 |
|
381 if ( loadUrl ) |
|
382 { |
|
383 // Open a new popup window |
|
384 CBrowserWindow* window = iWindowManager->CreateWindowL( |
|
385 WindowId(), aTargetName ); |
|
386 if (window == NULL) |
|
387 { |
|
388 return retVal; |
|
389 } |
|
390 |
|
391 retVal = & ( window->BrCtlInterface() ); |
|
392 |
|
393 // do not initiate load, it does by the engine automatically |
|
394 // aUrl is empty / NULL |
|
395 |
|
396 |
|
397 // Indicate to the user that a new window is being opened |
|
398 HBufC* newWindow = StringLoader::LoadLC( R_BROWSER_NEW_WINDOW_OPENED ); |
|
399 iWindowManager->ApiProvider()->DialogsProvider(). |
|
400 ShowTooltipL( *newWindow ); |
|
401 CleanupStack::PopAndDestroy( newWindow ); |
|
402 } |
|
403 |
|
404 return retVal; |
|
405 } |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CBrowserWindow::FindWindowL() |
|
409 // ----------------------------------------------------------------------------- |
|
410 // |
|
411 CBrCtlInterface* CBrowserWindow::FindWindowL( const TDesC& aTargetName ) const |
|
412 { |
|
413 CBrowserWindow* window = iWindowManager->FindWindowL( aTargetName ); |
|
414 if( window ) |
|
415 return & ( window->BrCtlInterface() ); |
|
416 else |
|
417 return NULL; |
|
418 } |
|
419 |
|
420 // ----------------------------------------------------------------------------- |
|
421 // CBrowserWindow::HandleWindowCommandL() |
|
422 // ----------------------------------------------------------------------------- |
|
423 // |
|
424 void CBrowserWindow::HandleWindowCommandL( |
|
425 const TDesC& aTargetName, |
|
426 TBrCtlWindowCommand aCommand ) |
|
427 { |
|
428 LOG_ENTERFN("CBrowserWindow::HandleWindowCommandL"); |
|
429 BROWSER_LOG( ( _L( "window Id: %d, aCommand: %d" ), WindowId(), aCommand ) ); |
|
430 |
|
431 // KNullDesC() refers to the current window |
|
432 |
|
433 // I am NOT that targetwindow |
|
434 if( aTargetName != KNullDesC() && iTargetName->Compare( aTargetName ) != 0 ) |
|
435 { |
|
436 // try to find that window |
|
437 CBrowserWindow* window = iWindowManager->FindWindowL( aTargetName ); |
|
438 if( window ) |
|
439 { |
|
440 window->HandleWindowCommandL( aTargetName, aCommand ); |
|
441 } |
|
442 else |
|
443 { |
|
444 // no window with that name |
|
445 } |
|
446 } |
|
447 else // I am that targetwindow |
|
448 { |
|
449 switch( aCommand ) |
|
450 { |
|
451 case EShowWindow: // to activate a window after creating it |
|
452 case EFocusWindow: // window.focus or reload |
|
453 // focusing this window |
|
454 { |
|
455 // Changes were made to ClearHistory that cause it to keep one (current) page |
|
456 // In order to reuse a window we need to clear the history again after the first new page |
|
457 // is loaded |
|
458 if (iFirstPage) |
|
459 { |
|
460 BrCtlInterface().HandleCommandL((TInt)TBrCtlDefs::ECommandClearHistory + (TInt)TBrCtlDefs::ECommandIdBase); |
|
461 iFirstPage = EFalse; |
|
462 } |
|
463 iWindowManager->SwitchWindowL( WindowId() ); |
|
464 break; |
|
465 } |
|
466 case EUnfocusWindow: // focusing the last active window |
|
467 { |
|
468 // iWindowManager->SwitchWindowL( ); |
|
469 break; |
|
470 } |
|
471 case ECloseWindow: |
|
472 { |
|
473 CBrowserAppUi::Static()->CloseWindowL( WindowId() ); |
|
474 break; |
|
475 } |
|
476 // case EDisableScriptLog: |
|
477 // iWindowManager->ApiProvider()->Preferences().SetScriptLogL( TBrCtlDefs::EScriptLogDisable ); |
|
478 // break; |
|
479 default: |
|
480 { |
|
481 break; |
|
482 } |
|
483 } |
|
484 } |
|
485 } |
|
486 |
|
487 // --------------------------------------------------------- |
|
488 // CBrowserWindow::IsPageOverviewSupported |
|
489 // --------------------------------------------------------- |
|
490 // |
|
491 TBool CBrowserWindow::IsPageOverviewSupportedL() |
|
492 { |
|
493 if(!iIsPageOverviewSupportQueried) |
|
494 { |
|
495 iIsPageOverviewSupported = iBrCtlInterface->BrowserSettingL( |
|
496 TBrCtlDefs::ESettingsPageOverview ); |
|
497 iIsPageOverviewSupportQueried = ETrue; |
|
498 } |
|
499 |
|
500 return iIsPageOverviewSupported; |
|
501 } |
|
502 |
|
503 // ----------------------------------------------------------------------------- |
|
504 // CBrowserWindow::ResetPageOverviewLocalSettingL() |
|
505 // ----------------------------------------------------------------------------- |
|
506 // |
|
507 void CBrowserWindow::ResetPageOverviewLocalSettingL() |
|
508 { |
|
509 iIsPageOverviewOn = |
|
510 iWindowManager->ApiProvider()->Preferences().PageOverview(); |
|
511 BrCtlInterface().SetBrowserSettingL(TBrCtlDefs::ESettingsPageOverview, |
|
512 iIsPageOverviewOn ); |
|
513 } |
|
514 |
|
515 // ----------------------------------------------------------------------------- |
|
516 // CBrowserWindow::ChangeTitlePaneTextUntilL() |
|
517 // ----------------------------------------------------------------------------- |
|
518 // |
|
519 void CBrowserWindow::ChangeTitlePaneTextUntilL( |
|
520 const TDesC& aTitle, TInt /* aInterval */ ) |
|
521 { |
|
522 iWindowManager->ApiProvider()->DialogsProvider().ShowTooltipL( aTitle ); |
|
523 } |
|
524 |
|
525 // ----------------------------------------------------------------------------- |
|
526 // CBrowserWindow::FlipPageOverviewLocalSettingL() |
|
527 // ----------------------------------------------------------------------------- |
|
528 // |
|
529 void CBrowserWindow::FlipPageOverviewLocalSettingL() |
|
530 { |
|
531 iIsPageOverviewOn = !iIsPageOverviewOn; |
|
532 BrCtlInterface().SetBrowserSettingL( TBrCtlDefs::ESettingsPageOverview, |
|
533 iIsPageOverviewOn ); |
|
534 TInt tooltipResource = iIsPageOverviewOn ? |
|
535 R_BROWSER_TOOLTIP_PAGE_OVERVIEW_ON : R_BROWSER_TOOLTIP_PAGE_OVERVIEW_OFF; |
|
536 HBufC* overviewTooltip = StringLoader::LoadLC( tooltipResource ); |
|
537 |
|
538 iWindowManager->ApiProvider()->DialogsProvider().ShowTooltipL( *overviewTooltip ); |
|
539 CleanupStack::PopAndDestroy( overviewTooltip ); |
|
540 } |
|
541 |
|
542 // ----------------------------------------------------------------------------- |
|
543 // CBrowserWindow::BrCtlInterface() |
|
544 // ----------------------------------------------------------------------------- |
|
545 // |
|
546 CBrCtlInterface& CBrowserWindow::BrCtlInterface() const |
|
547 { |
|
548 return *iBrCtlInterface; |
|
549 } |
|
550 |
|
551 // ----------------------------------------------------------------------------- |
|
552 // CBrowserWindow::Display() |
|
553 // ----------------------------------------------------------------------------- |
|
554 // |
|
555 MDisplay& CBrowserWindow::Display() const |
|
556 { |
|
557 return *iDisplay; |
|
558 } |
|
559 |
|
560 // ----------------------------------------------------------------------------- |
|
561 // CBrowserWindow::LoadObserver() |
|
562 // ----------------------------------------------------------------------------- |
|
563 // |
|
564 CBrowserLoadObserver& CBrowserWindow::LoadObserver() const |
|
565 { |
|
566 return *iLoadObserver; |
|
567 } |
|
568 |
|
569 // ----------------------------------------------------------------------------- |
|
570 // CBrowserWindow::SoftkeysObserver() |
|
571 // ----------------------------------------------------------------------------- |
|
572 // |
|
573 CBrowserSoftkeysObserver& CBrowserWindow::SoftkeysObserver() const |
|
574 { |
|
575 return *iSoftkeysObserver; |
|
576 } |
|
577 |
|
578 // ----------------------------------------------------------------------------- |
|
579 // CBrowserWindow::SpecialLoadObserver() |
|
580 // ----------------------------------------------------------------------------- |
|
581 // |
|
582 CBrowserSpecialLoadObserver& CBrowserWindow::SpecialLoadObserver() const |
|
583 { |
|
584 return *iSpecialLoadObserver; |
|
585 } |
|
586 |
|
587 // ---------------------------------------------------------------------------- |
|
588 // CBrowserWindow::HandlePreferencesChangeL() |
|
589 // ---------------------------------------------------------------------------- |
|
590 // |
|
591 void CBrowserWindow::HandlePreferencesChangeL( |
|
592 TPreferencesEvent aEvent, |
|
593 TPreferencesValues& aValues, |
|
594 TBrCtlDefs::TBrCtlSettings aSettingType ) |
|
595 { |
|
596 switch ( aEvent ) |
|
597 { |
|
598 case EPreferencesActivate: |
|
599 { |
|
600 // Provide local settings |
|
601 aValues.iFontSize = iFontSize; |
|
602 aValues.iTextWrap = iTextWrap; |
|
603 aValues.iEncoding = iEncoding; |
|
604 break; |
|
605 } |
|
606 case EPreferencesDeactivate: |
|
607 { |
|
608 // Save local preferences and notify Browser Control |
|
609 if ( iActive ) // Topmost window only |
|
610 { |
|
611 UpdateLocalPreferencesL( aValues ); |
|
612 } |
|
613 break; |
|
614 } |
|
615 case EPreferencesItemChange: |
|
616 { |
|
617 // All preferences changes should notify the |
|
618 // Browser Control |
|
619 UpdateGlobalPreferencesL( aSettingType ); |
|
620 |
|
621 if ( iActive ) // Topmost window only |
|
622 { |
|
623 UpdateLocalPreferencesL( aValues ); |
|
624 // Change the local setting to the changed setting. |
|
625 iIsPageOverviewOn = iWindowManager->ApiProvider()->Preferences().PageOverview(); |
|
626 } |
|
627 break; |
|
628 } |
|
629 default: |
|
630 // Do nothing |
|
631 break; |
|
632 } |
|
633 } |
|
634 |
|
635 // ----------------------------------------------------------------------------- |
|
636 // CBrowserWindow::UpdateGlobalPreferencesL() |
|
637 // ----------------------------------------------------------------------------- |
|
638 // |
|
639 void CBrowserWindow::UpdateGlobalPreferencesL( |
|
640 TBrCtlDefs::TBrCtlSettings aSettingType ) |
|
641 { |
|
642 // Local Settings should be ignored |
|
643 switch ( aSettingType ) |
|
644 { |
|
645 case TBrCtlDefs::ESettingsAutoLoadImages: |
|
646 { |
|
647 // WebEngine has two different settings for Content Autoload enable/disable: |
|
648 // AutoLoad Images - True/False and Disable flash - True/False |
|
649 // Here is how the Load Content setting in UI maps to the Image and |
|
650 // Flash settings in Webengine in case flash Plugin is present |
|
651 // Load Content = 0, AutoLoadImages = 0, DisableFlash = 1 |
|
652 // Load Content = 1, AutoLoadImages = 1, DisableFlash = 1 |
|
653 // Load Content = 2, AutoLoadImages = 1, DisableFlash = 0 |
|
654 // In case flash plugin is not present |
|
655 // Load Content = 0, AutoLoadImages = 0, DisableFlash = 1 |
|
656 // Load Content = 1, AutoLoadImages = 1, DisableFlash = 1 |
|
657 |
|
658 iBrCtlInterface->SetBrowserSettingL( |
|
659 TBrCtlDefs::ESettingsAutoLoadImages, |
|
660 ((Preferences().AutoLoadContent() == EWmlSettingsAutoloadText) |
|
661 ?EFalse:ETrue)); |
|
662 |
|
663 iBrCtlInterface->SetBrowserSettingL( |
|
664 TBrCtlDefs::ESettingsDisableFlash, |
|
665 ((Preferences().AutoLoadContent() == EWmlSettingsAutoloadAll) |
|
666 ?EFalse:ETrue)); |
|
667 break; |
|
668 } |
|
669 case TBrCtlDefs::ESettingsEmbedded: |
|
670 { |
|
671 iBrCtlInterface->SetBrowserSettingL( |
|
672 TBrCtlDefs::ESettingsEmbedded, |
|
673 Preferences().EmbeddedMode() ); |
|
674 break; |
|
675 } |
|
676 case TBrCtlDefs::ESettingsCookiesEnabled: |
|
677 { |
|
678 iBrCtlInterface->SetBrowserSettingL( |
|
679 TBrCtlDefs::ESettingsCookiesEnabled, |
|
680 Preferences().Cookies() ); |
|
681 break; |
|
682 } |
|
683 case TBrCtlDefs::ESettingsECMAScriptEnabled: |
|
684 { |
|
685 iBrCtlInterface->SetBrowserSettingL( |
|
686 TBrCtlDefs::ESettingsECMAScriptEnabled, |
|
687 Preferences().Ecma() ); |
|
688 break; |
|
689 } |
|
690 case TBrCtlDefs::ESettingsScriptLog: |
|
691 { |
|
692 iBrCtlInterface->SetBrowserSettingL( |
|
693 TBrCtlDefs::ESettingsScriptLog, |
|
694 Preferences().ScriptLog() ); |
|
695 break; |
|
696 } |
|
697 case TBrCtlDefs::ESettingsIMEINotifyEnabled: |
|
698 { |
|
699 iBrCtlInterface->SetBrowserSettingL( |
|
700 TBrCtlDefs::ESettingsIMEINotifyEnabled, |
|
701 Preferences().IMEINotification() ); |
|
702 break; |
|
703 } |
|
704 case TBrCtlDefs::ESettingsSendRefererHeader: |
|
705 { |
|
706 iBrCtlInterface->SetBrowserSettingL( |
|
707 TBrCtlDefs::ESettingsSendRefererHeader, |
|
708 Preferences().SendReferrer() ); |
|
709 break; |
|
710 } |
|
711 case TBrCtlDefs::ESettingsSecurityWarnings: |
|
712 { |
|
713 iBrCtlInterface->SetBrowserSettingL( |
|
714 TBrCtlDefs::ESettingsSecurityWarnings, |
|
715 Preferences().HttpSecurityWarnings() ); |
|
716 break; |
|
717 } |
|
718 |
|
719 case TBrCtlDefs::ESettingsAutoOpenDownloads: |
|
720 { |
|
721 iBrCtlInterface->SetBrowserSettingL( |
|
722 TBrCtlDefs::ESettingsAutoOpenDownloads, |
|
723 Preferences().DownloadsOpen() ); |
|
724 break; |
|
725 } |
|
726 |
|
727 case TBrCtlDefs::ESettingsPageOverview: |
|
728 { |
|
729 if( IsPageOverviewSupportedL() ) |
|
730 { |
|
731 iBrCtlInterface->SetBrowserSettingL( |
|
732 TBrCtlDefs::ESettingsPageOverview, |
|
733 Preferences().PageOverview() ); |
|
734 } |
|
735 break; |
|
736 } |
|
737 case TBrCtlDefs::ESettingsBackList: |
|
738 { |
|
739 iBrCtlInterface->SetBrowserSettingL( |
|
740 TBrCtlDefs::ESettingsBackList, |
|
741 Preferences().BackList() ); |
|
742 break; |
|
743 } |
|
744 case TBrCtlDefs::ESettingsAutoRefresh: |
|
745 { |
|
746 iBrCtlInterface->SetBrowserSettingL( |
|
747 TBrCtlDefs::ESettingsAutoRefresh, |
|
748 Preferences().AutoRefresh() ); |
|
749 break; |
|
750 } |
|
751 case TBrCtlDefs::ESettingsAutoFormFillEnabled: |
|
752 { |
|
753 iBrCtlInterface->SetBrowserSettingL( |
|
754 TBrCtlDefs::ESettingsAutoFormFillEnabled, |
|
755 Preferences().FormDataSaving() ); |
|
756 break; |
|
757 } |
|
758 case TBrCtlDefs::ESettingsToolbarOnOff: |
|
759 { |
|
760 iBrCtlInterface->SetBrowserSettingL( |
|
761 TBrCtlDefs::ESettingsToolbarOnOff, |
|
762 Preferences().ShowToolbarOnOff() ); |
|
763 break; |
|
764 } |
|
765 case TBrCtlDefs::ESettingsToolbarButton1Cmd: |
|
766 { |
|
767 iBrCtlInterface->SetBrowserSettingL( |
|
768 TBrCtlDefs::ESettingsToolbarButton1Cmd, |
|
769 Preferences().ShowToolbarButton1Cmd() ); |
|
770 break; |
|
771 } |
|
772 case TBrCtlDefs::ESettingsToolbarButton2Cmd: |
|
773 { |
|
774 iBrCtlInterface->SetBrowserSettingL( |
|
775 TBrCtlDefs::ESettingsToolbarButton2Cmd, |
|
776 Preferences().ShowToolbarButton2Cmd() ); |
|
777 break; |
|
778 } |
|
779 case TBrCtlDefs::ESettingsToolbarButton3Cmd: |
|
780 { |
|
781 iBrCtlInterface->SetBrowserSettingL( |
|
782 TBrCtlDefs::ESettingsToolbarButton3Cmd, |
|
783 Preferences().ShowToolbarButton3Cmd() ); |
|
784 break; |
|
785 } |
|
786 case TBrCtlDefs::ESettingsToolbarButton4Cmd: |
|
787 { |
|
788 iBrCtlInterface->SetBrowserSettingL( |
|
789 TBrCtlDefs::ESettingsToolbarButton4Cmd, |
|
790 Preferences().ShowToolbarButton4Cmd() ); |
|
791 break; |
|
792 } |
|
793 case TBrCtlDefs::ESettingsToolbarButton5Cmd: |
|
794 { |
|
795 iBrCtlInterface->SetBrowserSettingL( |
|
796 TBrCtlDefs::ESettingsToolbarButton5Cmd, |
|
797 Preferences().ShowToolbarButton5Cmd() ); |
|
798 break; |
|
799 } |
|
800 case TBrCtlDefs::ESettingsToolbarButton6Cmd: |
|
801 { |
|
802 iBrCtlInterface->SetBrowserSettingL( |
|
803 TBrCtlDefs::ESettingsToolbarButton6Cmd, |
|
804 Preferences().ShowToolbarButton6Cmd() ); |
|
805 break; |
|
806 } |
|
807 case TBrCtlDefs::ESettingsToolbarButton7Cmd: |
|
808 { |
|
809 iBrCtlInterface->SetBrowserSettingL( |
|
810 TBrCtlDefs::ESettingsToolbarButton7Cmd, |
|
811 Preferences().ShowToolbarButton7Cmd() ); |
|
812 break; |
|
813 } |
|
814 case TBrCtlDefs::ESettingsZoomLevelMin: |
|
815 { |
|
816 iBrCtlInterface->SetBrowserSettingL( |
|
817 TBrCtlDefs::ESettingsZoomLevelMin, |
|
818 Preferences().ZoomLevelMinimum() ); |
|
819 break; |
|
820 } |
|
821 case TBrCtlDefs::ESettingsZoomLevelMax: |
|
822 { |
|
823 iBrCtlInterface->SetBrowserSettingL( |
|
824 TBrCtlDefs::ESettingsZoomLevelMax, |
|
825 Preferences().ZoomLevelMaximum() ); |
|
826 break; |
|
827 } |
|
828 case TBrCtlDefs::ESettingsZoomLevelDefault: |
|
829 { |
|
830 iBrCtlInterface->SetBrowserSettingL( |
|
831 TBrCtlDefs::ESettingsZoomLevelDefault, |
|
832 Preferences().ZoomLevelDefault() ); |
|
833 break; |
|
834 } |
|
835 // LOCAL SETTINGS should be ignored |
|
836 case TBrCtlDefs::ESettingsTextWrapEnabled: |
|
837 case TBrCtlDefs::ESettingsFontSize: |
|
838 case TBrCtlDefs::ESettingsCharacterset: |
|
839 { |
|
840 break; |
|
841 } |
|
842 case TBrCtlDefs::ESettingsUnknown: // ignore |
|
843 default: |
|
844 break; |
|
845 } |
|
846 } |
|
847 |
|
848 // ----------------------------------------------------------------------------- |
|
849 // CBrowserWindow::UpdateLocalPreferencesL() |
|
850 // ----------------------------------------------------------------------------- |
|
851 // |
|
852 void CBrowserWindow::UpdateLocalPreferencesL( TPreferencesValues& aValues ) |
|
853 { |
|
854 if ( iFontSize != aValues.iFontSize ) |
|
855 { |
|
856 iFontSize = aValues.iFontSize; |
|
857 iBrCtlInterface->SetBrowserSettingL( |
|
858 ( TUint ) TBrCtlDefs::ESettingsFontSize, iFontSize ); |
|
859 } |
|
860 |
|
861 if ( iTextWrap != aValues.iTextWrap ) |
|
862 { |
|
863 iTextWrap = aValues.iTextWrap; |
|
864 iBrCtlInterface->SetBrowserSettingL( |
|
865 ( TUint ) TBrCtlDefs::ESettingsTextWrapEnabled, iTextWrap ); |
|
866 } |
|
867 if ( iEncoding != aValues.iEncoding ) |
|
868 { |
|
869 iEncoding = aValues.iEncoding; |
|
870 iBrCtlInterface->SetBrowserSettingL( |
|
871 ( TUint ) TBrCtlDefs::ESettingsCharacterset, iEncoding ); |
|
872 } |
|
873 } |
|
874 |
|
875 // ----------------------------------------------------------------------------- |
|
876 // CBrowserWindow::InitialiseLocalPreferencesL() |
|
877 // ----------------------------------------------------------------------------- |
|
878 // |
|
879 void CBrowserWindow::InitialiseLocalPreferencesL() |
|
880 { |
|
881 // Initialise local settings from Central Repository |
|
882 const TPreferencesValues& pref = Preferences().AllPreferencesL(); |
|
883 iFontSize = pref.iFontSize; |
|
884 iTextWrap = pref.iTextWrap; |
|
885 iEncoding = pref.iEncoding; |
|
886 } |
|
887 |
|
888 // ---------------------------------------------------------------------------- |
|
889 // CBrowserWindow::UpdateBrCtlSettingsL() |
|
890 // ---------------------------------------------------------------------------- |
|
891 // |
|
892 void CBrowserWindow::UpdateBrCtlSettingsL() |
|
893 { |
|
894 LOG_ENTERFN("CBrowserPreferences::UpdateBrCtlSettingsL"); |
|
895 |
|
896 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsSmallScreen ); |
|
897 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsAutoLoadImages ); |
|
898 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsEmbedded ); |
|
899 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsCookiesEnabled ); |
|
900 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsCSSFetchEnabled ); |
|
901 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsECMAScriptEnabled ); |
|
902 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsScriptLog ); |
|
903 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsIMEINotifyEnabled ); |
|
904 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsSendRefererHeader ); |
|
905 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsSecurityWarnings ); |
|
906 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsAutoOpenDownloads ); |
|
907 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsPageOverview ); |
|
908 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsBackList ); |
|
909 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsAutoRefresh ); |
|
910 |
|
911 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsAutoFormFillEnabled ); |
|
912 |
|
913 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarOnOff ); |
|
914 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton1Cmd ); |
|
915 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton2Cmd ); |
|
916 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton3Cmd ); |
|
917 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton4Cmd ); |
|
918 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton5Cmd ); |
|
919 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton6Cmd ); |
|
920 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsToolbarButton7Cmd ); |
|
921 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsZoomLevelMin ); |
|
922 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsZoomLevelMax ); |
|
923 UpdateGlobalPreferencesL( TBrCtlDefs::ESettingsZoomLevelDefault ); |
|
924 |
|
925 // Font Size - LOCAL Setting |
|
926 iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsFontSize, |
|
927 iWindowManager->ApiProvider()->Preferences().FontSize() ); |
|
928 |
|
929 // Text Wrap - LOCAL Setting |
|
930 iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsTextWrapEnabled, |
|
931 iWindowManager->ApiProvider()->Preferences().TextWrap() ); |
|
932 |
|
933 // Encoding - LOCAL Setting |
|
934 iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsCharacterset, |
|
935 iWindowManager->ApiProvider()->Preferences().Encoding() ); |
|
936 } |
|
937 |
|
938 // ----------------------------------------------------------------------------- |
|
939 // CBrowserWindow::ActivateL() |
|
940 // ----------------------------------------------------------------------------- |
|
941 // |
|
942 void CBrowserWindow::ActivateL( TBool aDraw ) |
|
943 { |
|
944 LOG_ENTERFN("CBrowserWindow::ActivateL"); |
|
945 BROWSER_LOG( ( _L( "Activating window no. %d" ), WindowId() ) ); |
|
946 iDialogsProviderProxy->WindowActivated(); |
|
947 iBrCtlInterface->MakeVisible( ETrue ); // notify the engine |
|
948 iActive = ETrue; |
|
949 if( aDraw ) |
|
950 { |
|
951 iBrCtlInterface->DrawNow(); |
|
952 TRAP_IGNORE(Display().StopProgressAnimationL());//also updates title |
|
953 } |
|
954 WindowMgr().NotifyObserversL( EWindowActivate, WindowId() ); |
|
955 } |
|
956 |
|
957 // ----------------------------------------------------------------------------- |
|
958 // CBrowserWindow::DeactivateL() |
|
959 // ----------------------------------------------------------------------------- |
|
960 // |
|
961 void CBrowserWindow::DeactivateL() |
|
962 { |
|
963 LOG_ENTERFN("CBrowserWindow::DeactivateL"); |
|
964 BROWSER_LOG( ( _L( "Deactivating window no. %d" ), WindowId() ) ); |
|
965 iActive = EFalse; |
|
966 iBrCtlInterface->MakeVisible( EFalse ); // notify the engine |
|
967 } |
|
968 |
|
969 // ----------------------------------------------------------------------------- |
|
970 // CBrowserWindow::Connection |
|
971 // ----------------------------------------------------------------------------- |
|
972 // |
|
973 MConnection& CBrowserWindow::Connection() const |
|
974 { |
|
975 return CALL_ORIG Connection(); |
|
976 } |
|
977 |
|
978 // ----------------------------------------------------------------------------- |
|
979 // CBrowserWindow::Preferences() |
|
980 // ----------------------------------------------------------------------------- |
|
981 // |
|
982 MPreferences& CBrowserWindow::Preferences() const |
|
983 { |
|
984 return CALL_ORIG Preferences(); |
|
985 } |
|
986 |
|
987 // ----------------------------------------------------------------------------- |
|
988 // CBrowserWindow::CommsModel |
|
989 // ----------------------------------------------------------------------------- |
|
990 // |
|
991 MCommsModel& CBrowserWindow::CommsModel() const |
|
992 { |
|
993 return CALL_ORIG CommsModel(); |
|
994 } |
|
995 |
|
996 // ----------------------------------------------------------------------------- |
|
997 // CBrowserWindow::DialogsProvider() |
|
998 // ----------------------------------------------------------------------------- |
|
999 // |
|
1000 CBrowserDialogsProvider& CBrowserWindow::DialogsProvider() const |
|
1001 { |
|
1002 __ASSERT_DEBUG( (iDialogsProviderProxy != NULL), Util::Panic( Util::EUninitializedData )); |
|
1003 return *( (CBrowserDialogsProvider*)iDialogsProviderProxy ); |
|
1004 } |
|
1005 |
|
1006 // ----------------------------------------------------------------------------- |
|
1007 // CBrowserWindow::BmOTABinSender |
|
1008 // ----------------------------------------------------------------------------- |
|
1009 // |
|
1010 MBmOTABinSender& CBrowserWindow::BmOTABinSenderL() |
|
1011 { |
|
1012 return CALL_ORIG BmOTABinSenderL(); |
|
1013 } |
|
1014 |
|
1015 // ----------------------------------------------------------------------------- |
|
1016 // CBrowserWindow::PopupEngine |
|
1017 // ----------------------------------------------------------------------------- |
|
1018 // |
|
1019 CBrowserPopupEngine& CBrowserWindow::PopupEngine() const |
|
1020 { |
|
1021 return CALL_ORIG PopupEngine(); |
|
1022 } |
|
1023 |
|
1024 // ----------------------------------------------------------------------------- |
|
1025 // CBrowserWindow::SetViewToBeActivatedIfNeededL |
|
1026 // ----------------------------------------------------------------------------- |
|
1027 // |
|
1028 void CBrowserWindow::SetViewToBeActivatedIfNeededL( |
|
1029 TUid aUid, |
|
1030 TInt aMessageId ) |
|
1031 { |
|
1032 CALL_ORIG SetViewToBeActivatedIfNeededL( aUid, aMessageId ); |
|
1033 } |
|
1034 |
|
1035 // ----------------------------------------------------------------------------- |
|
1036 // CBrowserWindow::IsCancelFetchAllowed |
|
1037 // ----------------------------------------------------------------------------- |
|
1038 // |
|
1039 TBool CBrowserWindow::IsCancelFetchAllowed() const |
|
1040 { |
|
1041 return CALL_ORIG IsCancelFetchAllowed(); |
|
1042 } |
|
1043 |
|
1044 // ----------------------------------------------------------------------------- |
|
1045 // CBrowserWindow::LastActiveViewId |
|
1046 // ----------------------------------------------------------------------------- |
|
1047 // |
|
1048 TUid CBrowserWindow::LastActiveViewId() const |
|
1049 { |
|
1050 return CALL_ORIG LastActiveViewId(); |
|
1051 } |
|
1052 |
|
1053 // ----------------------------------------------------------------------------- |
|
1054 // CBrowserWindow::SetLastActiveViewId |
|
1055 // ----------------------------------------------------------------------------- |
|
1056 // |
|
1057 void CBrowserWindow::SetLastActiveViewId( TUid aUid ) |
|
1058 { |
|
1059 CALL_ORIG SetLastActiveViewId( aUid ); |
|
1060 } |
|
1061 |
|
1062 // ----------------------------------------------------------------------------- |
|
1063 // CBrowserWindow::ExitInProgress |
|
1064 // ----------------------------------------------------------------------------- |
|
1065 // |
|
1066 TBool CBrowserWindow::ExitInProgress() const |
|
1067 { |
|
1068 return CALL_ORIG ExitInProgress(); |
|
1069 } |
|
1070 |
|
1071 // ----------------------------------------------------------------------------- |
|
1072 // CBrowserWindow::SetExitInProgress |
|
1073 // ----------------------------------------------------------------------------- |
|
1074 // |
|
1075 void CBrowserWindow::SetExitInProgress( TBool aValue ) |
|
1076 { |
|
1077 CALL_ORIG SetExitInProgress( aValue ); |
|
1078 } |
|
1079 |
|
1080 // ----------------------------------------------------------------------------- |
|
1081 // CBrowserWindow::IsConnecting |
|
1082 // ----------------------------------------------------------------------------- |
|
1083 // |
|
1084 TBool CBrowserWindow::IsConnecting() const |
|
1085 { |
|
1086 return CALL_ORIG IsConnecting(); |
|
1087 } |
|
1088 |
|
1089 // ----------------------------------------------------------------------------- |
|
1090 // CBrowserWindow::UpdateNaviPaneL |
|
1091 // ----------------------------------------------------------------------------- |
|
1092 // |
|
1093 void CBrowserWindow::UpdateNaviPaneL( TDesC& aStatusMsg ) |
|
1094 { |
|
1095 CALL_ORIG UpdateNaviPaneL( aStatusMsg ); |
|
1096 } |
|
1097 |
|
1098 // ----------------------------------------------------------------------------- |
|
1099 // CBrowserWindow::SetViewToReturnOnClose |
|
1100 // ----------------------------------------------------------------------------- |
|
1101 // |
|
1102 void CBrowserWindow::SetViewToReturnOnClose( TUid const &aUid ) |
|
1103 { |
|
1104 CALL_ORIG SetViewToReturnOnClose( aUid ); |
|
1105 } |
|
1106 |
|
1107 // ----------------------------------------------------------------------------- |
|
1108 // CBrowserWindow::CloseContentViewL |
|
1109 // ----------------------------------------------------------------------------- |
|
1110 // |
|
1111 void CBrowserWindow::CloseContentViewL() |
|
1112 { |
|
1113 CALL_ORIG CloseContentViewL(); |
|
1114 } |
|
1115 |
|
1116 // ----------------------------------------------------------------------------- |
|
1117 // CBrowserWindow::IsEmbeddedModeOn |
|
1118 // ----------------------------------------------------------------------------- |
|
1119 // |
|
1120 TBool CBrowserWindow::IsEmbeddedModeOn() const |
|
1121 { |
|
1122 return CALL_ORIG IsEmbeddedModeOn(); |
|
1123 } |
|
1124 |
|
1125 // ----------------------------------------------------------------------------- |
|
1126 // CBrowserWindow::IsShutdownRequested |
|
1127 // ----------------------------------------------------------------------------- |
|
1128 // |
|
1129 TBool CBrowserWindow::IsShutdownRequested() const |
|
1130 { |
|
1131 return CALL_ORIG IsShutdownRequested(); |
|
1132 } |
|
1133 |
|
1134 // ----------------------------------------------------------------------------- |
|
1135 // CBrowserWindow::ExitBrowser |
|
1136 // ----------------------------------------------------------------------------- |
|
1137 // |
|
1138 void CBrowserWindow::ExitBrowser( TBool aUserShutdown ) |
|
1139 { |
|
1140 CALL_ORIG ExitBrowser( aUserShutdown ); |
|
1141 } |
|
1142 |
|
1143 // ----------------------------------------------------------------------------- |
|
1144 // CBrowserWindow::IsAppShutterActive |
|
1145 // ----------------------------------------------------------------------------- |
|
1146 // |
|
1147 TBool CBrowserWindow::IsAppShutterActive() const |
|
1148 { |
|
1149 return CALL_ORIG IsAppShutterActive(); |
|
1150 } |
|
1151 |
|
1152 // ----------------------------------------------------------------------------- |
|
1153 // CBrowserWindow::StartPreferencesViewL |
|
1154 // ----------------------------------------------------------------------------- |
|
1155 // |
|
1156 TBool CBrowserWindow::StartPreferencesViewL( TUint aListItems ) |
|
1157 { |
|
1158 return CALL_ORIG StartPreferencesViewL( aListItems ); |
|
1159 } |
|
1160 |
|
1161 // ----------------------------------------------------------------------------- |
|
1162 // CBrowserWindow::IsPageLoaded |
|
1163 // ----------------------------------------------------------------------------- |
|
1164 // |
|
1165 TBool CBrowserWindow::IsPageLoaded() |
|
1166 { |
|
1167 return CALL_ORIG IsPageLoaded(); |
|
1168 } |
|
1169 |
|
1170 // ----------------------------------------------------------------------------- |
|
1171 // CBrowserWindow::IsForeGround |
|
1172 // ----------------------------------------------------------------------------- |
|
1173 // |
|
1174 TBool CBrowserWindow::IsForeGround() const |
|
1175 { |
|
1176 return CALL_ORIG IsForeGround(); |
|
1177 } |
|
1178 |
|
1179 // ----------------------------------------------------------------------------- |
|
1180 // CBrowserWindow::Fetching |
|
1181 // ----------------------------------------------------------------------------- |
|
1182 // |
|
1183 TBool CBrowserWindow::Fetching() const |
|
1184 { |
|
1185 return CALL_ORIG Fetching(); |
|
1186 } |
|
1187 // ----------------------------------------------------------------------------- |
|
1188 // CBrowserWindow::ContentDisplayed |
|
1189 // ----------------------------------------------------------------------------- |
|
1190 // |
|
1191 TBool CBrowserWindow::ContentDisplayed() const |
|
1192 { |
|
1193 return CALL_ORIG ContentDisplayed(); |
|
1194 } |
|
1195 // ----------------------------------------------------------------------------- |
|
1196 // CBrowserWindow::SetContentDisplayed |
|
1197 // ----------------------------------------------------------------------------- |
|
1198 // |
|
1199 void CBrowserWindow::SetContentDisplayed(TBool aValue) |
|
1200 { |
|
1201 return CALL_ORIG SetContentDisplayed( aValue ); |
|
1202 } |
|
1203 |
|
1204 // ----------------------------------------------------------------------------- |
|
1205 // CBrowserWindow::FetchBookmarkL |
|
1206 // ----------------------------------------------------------------------------- |
|
1207 // |
|
1208 void CBrowserWindow::FetchBookmarkL( TInt aBookmarkUid ) |
|
1209 { |
|
1210 CALL_ORIG FetchBookmarkL( aBookmarkUid ); |
|
1211 } |
|
1212 |
|
1213 // ----------------------------------------------------------------------------- |
|
1214 // CBrowserWindow::FetchBookmarkL |
|
1215 // ----------------------------------------------------------------------------- |
|
1216 // |
|
1217 void CBrowserWindow::FetchBookmarkL( const CFavouritesItem& aBookmarkItem ) |
|
1218 { |
|
1219 CALL_ORIG FetchBookmarkL( aBookmarkItem ); |
|
1220 } |
|
1221 |
|
1222 // ----------------------------------------------------------------------------- |
|
1223 // CBrowserWindow::FetchL |
|
1224 // ----------------------------------------------------------------------------- |
|
1225 // |
|
1226 void CBrowserWindow::FetchL( |
|
1227 const TDesC& aUrl, |
|
1228 const TDesC& aUserName, |
|
1229 const TDesC& aPassword, |
|
1230 const TFavouritesWapAp& aAccessPoint, |
|
1231 CBrowserLoadObserver::TBrowserLoadUrlType aUrlType ) |
|
1232 { |
|
1233 CALL_ORIG FetchL( aUrl, aUserName, aPassword, aAccessPoint, aUrlType ); |
|
1234 } |
|
1235 |
|
1236 // ----------------------------------------------------------------------------- |
|
1237 // CBrowserWindow::FetchL |
|
1238 // ----------------------------------------------------------------------------- |
|
1239 // |
|
1240 void CBrowserWindow::FetchL( |
|
1241 const TDesC& aUrl, |
|
1242 CBrowserLoadObserver::TBrowserLoadUrlType aUrlType ) |
|
1243 { |
|
1244 CALL_ORIG FetchL( aUrl, aUrlType ); |
|
1245 } |
|
1246 |
|
1247 // ----------------------------------------------------------------------------- |
|
1248 // CBrowserWindow::CancelFetch |
|
1249 // ----------------------------------------------------------------------------- |
|
1250 // |
|
1251 void CBrowserWindow::CancelFetch( TBool aIsUserInitiated ) |
|
1252 { |
|
1253 CALL_ORIG CancelFetch( aIsUserInitiated ); |
|
1254 } |
|
1255 |
|
1256 // ----------------------------------------------------------------------------- |
|
1257 // CBrowserWindow::SetRequestedAP |
|
1258 // ----------------------------------------------------------------------------- |
|
1259 // |
|
1260 void CBrowserWindow::SetRequestedAP( TInt aAp ) |
|
1261 { |
|
1262 CALL_ORIG SetRequestedAP( aAp ); |
|
1263 } |
|
1264 |
|
1265 // ----------------------------------------------------------------------------- |
|
1266 // CBrowserWindow::SetExitFromEmbeddedMode |
|
1267 // ----------------------------------------------------------------------------- |
|
1268 // |
|
1269 void CBrowserWindow::SetExitFromEmbeddedMode( TBool aFlag ) |
|
1270 { |
|
1271 CALL_ORIG SetExitFromEmbeddedMode( aFlag ); |
|
1272 } |
|
1273 |
|
1274 // ----------------------------------------------------------------------------- |
|
1275 // CBrowserWindow::IsProgressShown |
|
1276 // ----------------------------------------------------------------------------- |
|
1277 // |
|
1278 TBool CBrowserWindow::IsProgressShown() const |
|
1279 { |
|
1280 return CALL_ORIG IsProgressShown(); |
|
1281 } |
|
1282 |
|
1283 // ----------------------------------------------------------------------------- |
|
1284 // CBrowserWindow::SetProgressShown |
|
1285 // ----------------------------------------------------------------------------- |
|
1286 // |
|
1287 void CBrowserWindow::SetProgressShown( TBool aProgressShown ) |
|
1288 { |
|
1289 CALL_ORIG SetProgressShown( aProgressShown ); |
|
1290 } |
|
1291 |
|
1292 // ----------------------------------------------------------------------------- |
|
1293 // CBrowserWindow::StartedUp |
|
1294 // ----------------------------------------------------------------------------- |
|
1295 // |
|
1296 TBool CBrowserWindow::StartedUp() const |
|
1297 { |
|
1298 return CALL_ORIG StartedUp(); |
|
1299 } |
|
1300 |
|
1301 // ----------------------------------------------------------------------------- |
|
1302 // CBrowserWindow::RequestedAp |
|
1303 // ----------------------------------------------------------------------------- |
|
1304 // |
|
1305 TUint32 CBrowserWindow::RequestedAp() const |
|
1306 { |
|
1307 return CALL_ORIG RequestedAp(); |
|
1308 } |
|
1309 // ----------------------------------------------------------------------------- |
|
1310 // CBrowserWindow::LogAccessToRecentUrlL |
|
1311 // ----------------------------------------------------------------------------- |
|
1312 // |
|
1313 void CBrowserWindow::LogAccessToRecentUrlL( CBrCtlInterface& aBrCtlInterface) |
|
1314 { |
|
1315 CALL_ORIG LogAccessToRecentUrlL( aBrCtlInterface ); |
|
1316 } |
|
1317 |
|
1318 // ----------------------------------------------------------------------------- |
|
1319 // CBrowserWindow::LogRequestedPageToRecentUrlL |
|
1320 // ----------------------------------------------------------------------------- |
|
1321 // |
|
1322 void CBrowserWindow::LogRequestedPageToRecentUrlL( const TDesC& aUrl) |
|
1323 { |
|
1324 CALL_ORIG LogRequestedPageToRecentUrlL( aUrl ); |
|
1325 } |
|
1326 |
|
1327 // --------------------------------------------------------- |
|
1328 // CBrowserWindow::StartProgressAnimationL |
|
1329 // --------------------------------------------------------- |
|
1330 // |
|
1331 void CBrowserWindow::StartProgressAnimationL() |
|
1332 { |
|
1333 CALL_ORIG StartProgressAnimationL(); |
|
1334 } |
|
1335 |
|
1336 // --------------------------------------------------------- |
|
1337 // CBrowserWindow::StopProgressAnimationL |
|
1338 // --------------------------------------------------------- |
|
1339 // |
|
1340 void CBrowserWindow::StopProgressAnimationL() |
|
1341 { |
|
1342 CALL_ORIG StopProgressAnimationL(); |
|
1343 } |
|
1344 |
|
1345 #ifdef __RSS_FEEDS |
|
1346 // --------------------------------------------------------- |
|
1347 // CBrowserWindow::FeedsClientUtilities |
|
1348 // --------------------------------------------------------- |
|
1349 // |
|
1350 CFeedsClientUtilities& CBrowserWindow::FeedsClientUtilities() const |
|
1351 { |
|
1352 return CALL_ORIG FeedsClientUtilities(); |
|
1353 } |
|
1354 #endif // __RSS_FEEDS |
|
1355 |
|
1356 // --------------------------------------------------------- |
|
1357 // CBrowserWindow::BrowserWasLaunchedIntoFeeds |
|
1358 // --------------------------------------------------------- |
|
1359 // |
|
1360 TBool CBrowserWindow::BrowserWasLaunchedIntoFeeds() |
|
1361 { |
|
1362 return CALL_ORIG BrowserWasLaunchedIntoFeeds(); |
|
1363 } |
|
1364 |
|
1365 // --------------------------------------------------------- |
|
1366 // CBrowserWindow::SetHasWMLContent |
|
1367 // --------------------------------------------------------- |
|
1368 // |
|
1369 void CBrowserWindow::SetHasWMLContent(TBool aHasWMLContent) |
|
1370 { |
|
1371 iHasWMLContent = aHasWMLContent; |
|
1372 } |
|
1373 |
|
1374 // --------------------------------------------------------- |
|
1375 // CBrowserWindow::SetCurrWinHasWMLContent |
|
1376 // --------------------------------------------------------- |
|
1377 // |
|
1378 void CBrowserWindow::SetCurrWinHasWMLContent(TBool aCurrWinHasWMLContent) |
|
1379 { |
|
1380 iCurrWinHasWMLContent = aCurrWinHasWMLContent; |
|
1381 } |
|
1382 |
|
1383 // --------------------------------------------------------- |
|
1384 // CBrowserWindow::HasWMLContent |
|
1385 // --------------------------------------------------------- |
|
1386 // |
|
1387 TBool CBrowserWindow::HasWMLContent (TBool aCurrWinOnly) |
|
1388 { |
|
1389 if (aCurrWinOnly) |
|
1390 { |
|
1391 return iCurrWinHasWMLContent; |
|
1392 } |
|
1393 else |
|
1394 { |
|
1395 return iHasWMLContent; |
|
1396 } |
|
1397 } |
|
1398 |
|
1399 |
|
1400 // --------------------------------------------------------- |
|
1401 // CBrowserWindow::SetWMLMode |
|
1402 // --------------------------------------------------------- |
|
1403 // |
|
1404 void CBrowserWindow::SetWMLMode(TBool aWMLMode) |
|
1405 { |
|
1406 iWMLMode = aWMLMode; |
|
1407 } |
|
1408 |
|
1409 // --------------------------------------------------------- |
|
1410 // CBrowserWindow::SetFirstPage |
|
1411 // --------------------------------------------------------- |
|
1412 // |
|
1413 void CBrowserWindow::SetFirstPage(TBool aFirstPage) |
|
1414 { |
|
1415 iFirstPage = aFirstPage; |
|
1416 } |
|
1417 |
|
1418 // --------------------------------------------------------- |
|
1419 // CBrowserWindow::SetHasFeedsContent |
|
1420 // --------------------------------------------------------- |
|
1421 // |
|
1422 void CBrowserWindow::SetHasFeedsContent(TBool aHasFeedsContent) |
|
1423 { |
|
1424 iHasFeedsContent = aHasFeedsContent; |
|
1425 } |
|
1426 |
|
1427 // ----------------------------------------------------------------------------- |
|
1428 // CBrowserWindow::SetLastCBAUpdateView |
|
1429 // ----------------------------------------------------------------------------- |
|
1430 // |
|
1431 void CBrowserWindow::SetLastCBAUpdateView( TUid aView ) |
|
1432 { |
|
1433 CALL_ORIG SetLastCBAUpdateView( aView ); |
|
1434 } |
|
1435 |
|
1436 // ----------------------------------------------------------------------------- |
|
1437 // CBrowserWindow::GetLastCBAUpdateView |
|
1438 // ----------------------------------------------------------------------------- |
|
1439 // |
|
1440 TUid CBrowserWindow::GetLastCBAUpdateView() |
|
1441 { |
|
1442 return CALL_ORIG GetLastCBAUpdateView(); |
|
1443 } |
|
1444 |
|
1445 // ----------------------------------------------------------------------------- |
|
1446 // CBrowserWindow::GetPreviousViewFromViewHistory |
|
1447 // ----------------------------------------------------------------------------- |
|
1448 // |
|
1449 TUid CBrowserWindow::GetPreviousViewFromViewHistory() |
|
1450 { |
|
1451 return CALL_ORIG GetPreviousViewFromViewHistory(); |
|
1452 } |
|
1453 |
|
1454 // ----------------------------------------------------------------------------- |
|
1455 // CBrowserWindow::CalledFromAnotherApp |
|
1456 // ----------------------------------------------------------------------------- |
|
1457 // |
|
1458 TBool CBrowserWindow::CalledFromAnotherApp() |
|
1459 { |
|
1460 return CALL_ORIG CalledFromAnotherApp(); |
|
1461 } |
|
1462 |
|
1463 // ----------------------------------------------------------------------------- |
|
1464 // CBrowserWindow::SetCalledFromAnotherApp |
|
1465 // ----------------------------------------------------------------------------- |
|
1466 // |
|
1467 void CBrowserWindow::SetCalledFromAnotherApp( TBool aValue ) |
|
1468 { |
|
1469 return CALL_ORIG SetCalledFromAnotherApp( aValue ); |
|
1470 } |
|
1471 |
|
1472 // ----------------------------------------------------------------------------- |
|
1473 // CBrowserWindow::FlashPresent |
|
1474 // ----------------------------------------------------------------------------- |
|
1475 // |
|
1476 TBool CBrowserWindow::FlashPresent() |
|
1477 { |
|
1478 return CALL_ORIG FlashPresent(); |
|
1479 } |
|
1480 |
|
1481 |
|
1482 // ----------------------------------------------------------------------------- |
|
1483 // CBrowserWindow::IsLaunchHomePageDimmedL |
|
1484 // ----------------------------------------------------------------------------- |
|
1485 // |
|
1486 TBool CBrowserWindow::IsLaunchHomePageDimmedL() |
|
1487 { |
|
1488 return CALL_ORIG IsLaunchHomePageDimmedL(); |
|
1489 } |
|
1490 // ----------------------------------------------------------------------------- |
|
1491 // CBrowserWindow::IsDisplayingMenuOrDialog |
|
1492 // ----------------------------------------------------------------------------- |
|
1493 // |
|
1494 TBool CBrowserWindow::IsDisplayingMenuOrDialog() |
|
1495 { |
|
1496 return CALL_ORIG IsDisplayingMenuOrDialog(); |
|
1497 } |
|
1498 |
|
1499 #undef CALL_ORIG |
|
1500 |
|
1501 // End of file |