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: Header file for CBrowserAppUi |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __BROWSERAPPUI_H |
|
20 #define __BROWSERAPPUI_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <browser_platform_variant.hrh> |
|
24 #include <aknviewappui.h> |
|
25 #include <connectionobservers.h> // CHG! |
|
26 #include <apgcli.h> |
|
27 #include "ApiProvider.h" |
|
28 #include "BrowserBuild.h" |
|
29 #include "WmlBrowserBuild.h" |
|
30 #include <recenturlstore.h> |
|
31 |
|
32 #include <favouritesdb.h> |
|
33 #include <downloadedcontenthandler.h> |
|
34 #include "WindowInfoProvider.h" |
|
35 #include <browseroverriddensettings.h> |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CBrowserViewBase; |
|
39 class MCommsModel; |
|
40 class CBrowserCommsModel; |
|
41 class CBrowserPreferences; |
|
42 class CWmlBrowserBmOTABinSender; |
|
43 class CBrowserContentView; |
|
44 class CBrowserSoftkeysObserver; |
|
45 class CBrowserSpecialLoadObserver; |
|
46 class CBrowserAsyncExit; |
|
47 class CBrowserLauncherService; |
|
48 |
|
49 // Multiple Windows Support |
|
50 class CBrowserPopupEngine; |
|
51 class CBrowserWindow; |
|
52 class CBrowserWindowManager; |
|
53 class CBrowserBookmarksView; |
|
54 #ifdef __RSS_FEEDS |
|
55 class CFeedsClientUtilities; |
|
56 #endif // __RSS_FEEDS |
|
57 |
|
58 // CONSTANTS |
|
59 |
|
60 // |
|
61 // BROWSER UI KNOWN mime types |
|
62 // |
|
63 |
|
64 |
|
65 _LIT(KOPMLMimeType, "text/x-opml"); |
|
66 _LIT(KMimeTypeAppXML, "application/xml"); |
|
67 _LIT(KMimeTypeTextXML, "text/xml"); |
|
68 //++PK |
|
69 _LIT(KMimeTypeCapsTextXML, "Text/xml"); |
|
70 //++PK |
|
71 _LIT(KMimeTypeRSS, "application/rss+xml"); |
|
72 _LIT(KMimeTypeAtom, "application/atom+xml"); |
|
73 _LIT(KMimeTypeRDF, "application/rdf+xml"); |
|
74 |
|
75 |
|
76 class CBrowserPushMtmObserver; |
|
77 |
|
78 // CLASS DECLARATION |
|
79 |
|
80 /** |
|
81 * CBrowserAppUi. |
|
82 * |
|
83 * @lib Browser.app |
|
84 * @since Series 60 1.2 |
|
85 */ |
|
86 class CBrowserAppUi : public CAknViewAppUi, |
|
87 public MApiProvider, |
|
88 public MConnectionStageObserver, |
|
89 public MDownloadedContentHandler, |
|
90 public MWindowInfoProvider |
|
91 { |
|
92 public: // Constructors and destructor |
|
93 /** |
|
94 * Default constructor. |
|
95 */ |
|
96 CBrowserAppUi(); |
|
97 |
|
98 /** |
|
99 * Destructor. |
|
100 */ |
|
101 ~CBrowserAppUi(); |
|
102 |
|
103 public: |
|
104 #if defined(__S60_50__) |
|
105 /** |
|
106 * Handling the system Event. |
|
107 * @since Series 60 1.2 |
|
108 * @param aEvent The System event passed. |
|
109 */ |
|
110 |
|
111 void HandleSystemEventL(const TWsEvent& aEvent); |
|
112 #endif |
|
113 /** |
|
114 * Get the active view. |
|
115 * @since Series 60 1.2 |
|
116 * @return The current view. |
|
117 */ |
|
118 CBrowserViewBase* ActiveView(); |
|
119 |
|
120 /** |
|
121 * Checking if user wants to disconnect. |
|
122 * @since Series 60 1.2 |
|
123 * @param aUserInitiated it can be closed by user or the system. |
|
124 */ |
|
125 void ExitBrowser( TBool aUserInitiated ); |
|
126 |
|
127 /** |
|
128 * Calls views' method (ALWAYS changes the view's CBA). |
|
129 * @since Series 60 1.2 |
|
130 */ |
|
131 void UpdateCbaL(); |
|
132 |
|
133 /** |
|
134 * Handles commandline parameters. |
|
135 * @since Series 60 1.2 |
|
136 * @param aDocumentName Parameter string |
|
137 * @param aDoFetch Indicates that this function shoud fetch the given |
|
138 * URL. This parameter is required and used |
|
139 * by new embedding architecture. |
|
140 */ |
|
141 void ParseAndProcessParametersL( const TDesC8& aDocumentName, TBool aDoFetch = ETrue ); |
|
142 |
|
143 /** |
|
144 * Wait a while, contentview initializing itself |
|
145 * @since Series 60 3.2 |
|
146 */ |
|
147 void WaitCVInit(); |
|
148 /** |
|
149 * Set flag to ETrue if called from another application. |
|
150 * @since Series 60 1.2 |
|
151 * @param aValue Is browser called from some another App. |
|
152 */ |
|
153 void SetCalledFromAnotherApp( TBool aValue ); |
|
154 |
|
155 /** |
|
156 * Get flag if called from another application. |
|
157 * @since Series 60 3.1 |
|
158 * @return Etrue if browser is called from some another App. |
|
159 */ |
|
160 TBool CalledFromAnotherApp(); |
|
161 |
|
162 /** |
|
163 * Override CAknViewAppUi::ProcessCommandL. Calls CAknAppUi::StopDisplayingMenuBar() before iView one. |
|
164 * @since Series 60 |
|
165 * @param aCommand GUI command |
|
166 */ |
|
167 void ProcessCommandL(TInt aCommand); |
|
168 |
|
169 /** |
|
170 * Get the instance of the browser UI. |
|
171 * @since Series 60 1.2 |
|
172 * @return The browser UI. |
|
173 */ |
|
174 static CBrowserAppUi* Static(); |
|
175 |
|
176 /** |
|
177 * Contentview. |
|
178 * @since Series 60 1.2 |
|
179 */ |
|
180 CBrowserContentView* ContentView() const; |
|
181 |
|
182 /** |
|
183 * Check Operator Menu or Video Services status |
|
184 * @since Series 60 2.0 |
|
185 * @return ETrue if browser is running in Operator Menu or Video Services app |
|
186 */ |
|
187 TBool IsEmbeddedInOperatorMenu() const; |
|
188 |
|
189 /** |
|
190 * Check if avkon appshutter is running |
|
191 * @since Series60 2.0 |
|
192 * @return ETrue if avkon appshutter is running |
|
193 */ |
|
194 TBool IsAppShutterActive() const; |
|
195 |
|
196 /** |
|
197 * Returns value of iSomeItemsNotSecure member |
|
198 * @since Series60 2.0 |
|
199 * @return ETrue if some items is unsecure in page |
|
200 */ |
|
201 TBool SomeItemsNotSecure() const; |
|
202 |
|
203 /** |
|
204 * Fetch the home page |
|
205 */ |
|
206 void FetchHomePageL(); |
|
207 |
|
208 /** |
|
209 * Check if the application is in foreground |
|
210 * @return ETrue if application is in foreground |
|
211 */ |
|
212 inline TBool IsForeGround() const |
|
213 { return iIsForeground; } |
|
214 |
|
215 /** |
|
216 * Sets a private status to indicate that Browser has to use |
|
217 * a special exiting method. |
|
218 */ |
|
219 inline void SetExitFromEmbeddedMode( TBool aFlag ) |
|
220 { iExitFromEmbeddedMode = aFlag; } |
|
221 |
|
222 /** |
|
223 * Sets a the uid of the embedding application if the |
|
224 * Browser is embedded. |
|
225 */ |
|
226 inline void SetEmbeddingAppliacationUid( TUid aEmbeddingApplicationUid ) |
|
227 { iEmbeddingApplicationUid = aEmbeddingApplicationUid; } |
|
228 |
|
229 inline void SetBrowserLauncherService( CBrowserLauncherService* aBrowserLauncherService ) |
|
230 { iBrowserLauncherService = aBrowserLauncherService; } |
|
231 |
|
232 inline CBrowserLauncherService* BrowserLauncherService() const |
|
233 { return iBrowserLauncherService; } |
|
234 |
|
235 void CloseWindowL( TInt aWindowId = 0 ); |
|
236 |
|
237 inline CBrowserBookmarksView* GetBookmarksView() |
|
238 { return iBookmarksView; } |
|
239 |
|
240 void OpenLinkInNewWindowL( const CFavouritesItem& aBookmarkItem ); |
|
241 |
|
242 /** |
|
243 * Launching HomePage (AP home page, or user-defined home page). |
|
244 */ |
|
245 void LaunchHomePageL(); |
|
246 |
|
247 /** |
|
248 * Set home page found flag |
|
249 * @param aPgNotFoundFlag: indicate if home page is found or not. |
|
250 */ |
|
251 void SetPgNotFound(TBool aPgNotFoundFlag) {iPgNotFound = aPgNotFoundFlag;}; |
|
252 |
|
253 /** |
|
254 * Catch any key presses that are Application wide. Called from OfferKeyEventL() in view containers |
|
255 * @param aKeyEvent: |
|
256 * @param aType: |
|
257 */ |
|
258 TKeyResponse OfferApplicationSpecificKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
259 |
|
260 /** |
|
261 * Sets requested AP. |
|
262 * @param aAp the AP to use when connectionneeded is called. |
|
263 */ |
|
264 void SetRequestedAP( TInt aAp ); |
|
265 |
|
266 /** |
|
267 * Gets the currently focused image, and saves it to Gallery. |
|
268 */ |
|
269 void SaveFocusedImageToGalleryL(); |
|
270 |
|
271 /** |
|
272 * Check if shutdown was requested. |
|
273 * @return ETrue if shutdown was requested. |
|
274 */ |
|
275 TBool IsShutdownRequested() const; |
|
276 |
|
277 /** |
|
278 * Check if a progress bar is shown. |
|
279 * @return ETrue if progress bar is shown. |
|
280 */ |
|
281 TBool IsProgressShown() const; |
|
282 |
|
283 /** |
|
284 * Sets prograss bar showing status. |
|
285 * @param ETrue to show, EFalse to hide the progress bar |
|
286 */ |
|
287 void SetProgressShown( TBool aProgressShown ); |
|
288 |
|
289 /** |
|
290 * Check if RFile content should be handled |
|
291 * by BrowserUI rather than sent off to BrCtl |
|
292 * @return ETrue if it should be handled by BrowserUI |
|
293 * @param an RFile filehandle, and an allocated buffer to hold |
|
294 * discovered mime type |
|
295 */ |
|
296 TBool CBrowserAppUi::RecognizeUiFileL( RFile& aFileHandle, TBuf<KMaxDataTypeLength>& aDataTypeDes ); |
|
297 |
|
298 /** |
|
299 * Confirm with the user that a file should be handled by |
|
300 * BrowserUI according to it's mime type with appropriate |
|
301 * dialogs, etc. The name is used for the dialogs |
|
302 * @return ETrue if yes, EFalse otherwise |
|
303 * @param a filename to be shown in dialog, and a mime type |
|
304 * to switch on so we can show different dialogs in different situations |
|
305 */ |
|
306 TBool ConfirmUiHandlingL( TFileName& aFilename, TBuf<KMaxDataTypeLength>& aDataTypeDes ); |
|
307 |
|
308 /** |
|
309 * Given a file handle (RFile) and a file path, |
|
310 * copy the contents of the RFile to the file path given |
|
311 * @return void |
|
312 * @param a filehandle RFile, and a path to copy the contents to |
|
313 */ |
|
314 void CopyUiRFileToFileL( RFile& aFile, const TDesC& aFilepath ); |
|
315 |
|
316 /** |
|
317 * Handle a file that BrowserUi can process (as opposed to |
|
318 * BrCtl) |
|
319 * This will also setup views accordingly (the setup may be different from the HandleUiDownload case) |
|
320 * @return void |
|
321 * @param the full path of the filename to be handled and the mime type |
|
322 * so that handling can be different for different mime types |
|
323 */ |
|
324 void HandleUiFileL( TFileName& aFilepath, TBuf<KMaxDataTypeLength>& aDataTypeDes ); |
|
325 |
|
326 /** |
|
327 * Handle a file that BrowserUi can process that is downloaded from the content view |
|
328 * This will also setup views accordingly (the setup may be different from the HandleUiFile case) |
|
329 * @return void |
|
330 * @param the full path of the filename to be handled and the mime type |
|
331 * so that handling can be different for different mime types |
|
332 */ |
|
333 void HandleUiDownloadL( TFileName& aFilepath, TBuf<KMaxDataTypeLength>& aDataTypeDes ); |
|
334 |
|
335 /** |
|
336 * Launch the browser so that it starts directly into the feeds view |
|
337 * @return void |
|
338 * @param none |
|
339 */ |
|
340 void LaunchIntoFeedsL(); |
|
341 |
|
342 public: // From CEikAppUi |
|
343 /** |
|
344 * Handles user commands. |
|
345 * @param aCommand Command to be handled. |
|
346 */ |
|
347 void HandleCommandL( TInt aCommand ); |
|
348 void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination); |
|
349 |
|
350 public: // Functions from MApiProvider |
|
351 |
|
352 /** |
|
353 * Returns reference to the implementation of MDisplay. |
|
354 * @return An implementation of MDisplay. |
|
355 */ |
|
356 MDisplay& Display() const; |
|
357 |
|
358 /** |
|
359 * Returns a reference to the implementaion of MConnection, |
|
360 * through wich some high-level connection specific data can be set. |
|
361 * @return reference to MConnection object. |
|
362 */ |
|
363 MConnection& Connection( ) const; |
|
364 |
|
365 /** |
|
366 * Returns reference to the implementation of MPrefences. |
|
367 * @return An implementation of MPrefences. |
|
368 */ |
|
369 MPreferences& Preferences() const; |
|
370 |
|
371 /** |
|
372 * Returns reference to the implementation of MCommsModel. |
|
373 * @return An implementation of MCommsModel. |
|
374 */ |
|
375 MCommsModel& CommsModel() const; |
|
376 |
|
377 /** |
|
378 * Returns reference to the CBrCtlInterface |
|
379 * @return A reference to CBrCtlInterface |
|
380 */ |
|
381 CBrCtlInterface& BrCtlInterface() const; |
|
382 |
|
383 /** |
|
384 * Returns reference to CBrowserLoadObserver. |
|
385 * @return An implementation of MBrCtlLoadEventObserver |
|
386 */ |
|
387 CBrowserLoadObserver& LoadObserver() const; |
|
388 |
|
389 /** |
|
390 * Returns reference to CBrowserLoadObserver. |
|
391 * @return An implementation of MBrCtlLoadEventObserver |
|
392 */ |
|
393 CBrowserSpecialLoadObserver& SpecialLoadObserver() const; |
|
394 |
|
395 CBrowserSoftkeysObserver& SoftkeysObserver() const; |
|
396 |
|
397 /** |
|
398 * Returns reference to CBrowserDialogsProvider. |
|
399 * @return An implementation of MBrCtlDialogsProvider |
|
400 */ |
|
401 CBrowserDialogsProvider& DialogsProvider() const; |
|
402 |
|
403 CBrowserPopupEngine& PopupEngine() const; |
|
404 |
|
405 /** |
|
406 * Returns reference to the implementation of MBmOTABinSender. |
|
407 * @return An implementation of MBmOTABinSender. |
|
408 */ |
|
409 MBmOTABinSender& BmOTABinSenderL(); |
|
410 |
|
411 |
|
412 /** |
|
413 * Returns reference to the implementation of MStartPageHandler. |
|
414 * @return An implementation of MStartPageHandler. |
|
415 */ |
|
416 CBrowserWindowManager& WindowMgr() const; |
|
417 |
|
418 /** |
|
419 * |
|
420 */ |
|
421 inline TBool StartedUp() const { return iStartedUp; }; |
|
422 |
|
423 /** |
|
424 * |
|
425 */ |
|
426 void ConnNeededStatusL( TInt aErr ); |
|
427 |
|
428 /** |
|
429 * Checks the last used AP. |
|
430 * @return the Id of the last used AP. |
|
431 */ |
|
432 inline TUint32 RequestedAp() const { return iRequestedAp; } |
|
433 |
|
434 /** |
|
435 * In some cases it's not permitted to cancel fetching process. |
|
436 * @return ETrue if cancelling fetch is allowed, otherwise EFalse. |
|
437 */ |
|
438 TBool IsCancelFetchAllowed() const; |
|
439 |
|
440 /** |
|
441 * Sets uid which should be activated if needed. |
|
442 * If not, it activates view immediately. |
|
443 * @param aUid Uid of the view. |
|
444 * @param aMessageId Id of the message. |
|
445 */ |
|
446 void SetViewToBeActivatedIfNeededL( TUid aUid, TInt aMessageId = 0 ); |
|
447 |
|
448 /** |
|
449 * Returns the Uid of the last visited Uid. |
|
450 * @return Uid of the last used view. |
|
451 */ |
|
452 TUid LastActiveViewId() const; |
|
453 |
|
454 /** |
|
455 * Sets uid of the last used view. |
|
456 * @param aUid Uid of the latest used view. |
|
457 */ |
|
458 void SetLastActiveViewId( TUid aUid ); |
|
459 |
|
460 |
|
461 /** |
|
462 * Gets uid of the current view. |
|
463 * @param none |
|
464 * @return TUid of the current view |
|
465 */ |
|
466 TUid GetCurrentViewId() const |
|
467 { |
|
468 return iCurrentView; |
|
469 } |
|
470 |
|
471 /** |
|
472 * Set the View for in which the last CBA update was made |
|
473 * @since 5.0 |
|
474 */ |
|
475 void SetLastCBAUpdateView( TUid aView ) { iLastCBAUpdateView = aView; } |
|
476 |
|
477 /** |
|
478 * Get the view in which the last CBA update was made |
|
479 * @since 5.0 |
|
480 * @return TUid of last view for which CBA was updated |
|
481 */ |
|
482 TUid GetLastCBAUpdateView() { return iLastCBAUpdateView; } |
|
483 |
|
484 /** |
|
485 * Tells if Browser is in the middle of a shutdown process. |
|
486 * @return ETrue if the app is being closed, otherwise with EFalse. |
|
487 */ |
|
488 TBool ExitInProgress() const; |
|
489 |
|
490 /** |
|
491 * Sets a flag in Browser to indicate shutdown process. |
|
492 * @param aValue ETrue if exit process will be started, otherwise EFalse. |
|
493 */ |
|
494 void SetExitInProgress( TBool aValue ); |
|
495 |
|
496 /** |
|
497 * Is Browser connection procedure ongoing or not. |
|
498 * @return ETrue if connection procedure is ongoing, otherwise EFalse. |
|
499 */ |
|
500 TBool IsConnecting() const; |
|
501 |
|
502 /** |
|
503 * Updates progress bar in contentview. |
|
504 * @param aStatusMsg Progress bar text. |
|
505 */ |
|
506 void UpdateNaviPaneL( TDesC& aStatusMsg ); |
|
507 |
|
508 /** |
|
509 * Set view to return to when closing the content view. |
|
510 * @since Series60 1.2 |
|
511 * @param aUid View uid |
|
512 */ |
|
513 void SetViewToReturnOnClose( TUid const &aUid ); |
|
514 |
|
515 /** |
|
516 * Close the content view by activating the bookmarks view |
|
517 * @since Series60 1.2 |
|
518 */ |
|
519 void CloseContentViewL(); |
|
520 |
|
521 /** |
|
522 * Tells if Browser is in the embedded mode |
|
523 * @return ETrue if the Browser is in the embedded mode, |
|
524 * otherwise with EFalse. |
|
525 */ |
|
526 TBool IsEmbeddedModeOn() const; |
|
527 |
|
528 /** |
|
529 * Starts prefrences view if no valid ap |
|
530 * @since Series60 2.0 |
|
531 * @return ETrue if access point has been set otherwise EFalse. |
|
532 */ |
|
533 TBool StartPreferencesViewL( TUint aListItems ); |
|
534 |
|
535 /** |
|
536 * Gives back a pointer to the Recent Url Store |
|
537 * @return iRecentUrlStore |
|
538 */ |
|
539 CRecentUrlStore* RecentUrlStore(); |
|
540 |
|
541 /** |
|
542 * Returns ETrue if at least one page has been loaded. |
|
543 * @return ETrue if at least one page has been loaded.\n |
|
544 * EFalse if no pages has been loaded. |
|
545 */ |
|
546 TBool IsPageLoaded(); |
|
547 |
|
548 /** |
|
549 * Returns fetching status. |
|
550 * @return ETrue if there is a fetch going on.\n |
|
551 * EFalse otherwise. |
|
552 */ |
|
553 TBool Fetching() const; |
|
554 |
|
555 /** |
|
556 * Checks if the content of a new page is displayed. |
|
557 * @return ETrue if the content is displayed. |
|
558 * EFalse otherwise. |
|
559 * (useful for zooming while page is loading) |
|
560 */ |
|
561 TBool ContentDisplayed() const; |
|
562 |
|
563 /** |
|
564 * Sets the content displayed status |
|
565 * (useful for zooming while page is loading) |
|
566 */ |
|
567 void SetContentDisplayed( TBool aValue ); |
|
568 |
|
569 /** |
|
570 * Initiate fetching of bookmark. |
|
571 * @param aBookmarkUid Uid of bookmark to fetch. |
|
572 */ |
|
573 void FetchBookmarkL( TInt aBookmarkUid ); |
|
574 |
|
575 /** |
|
576 * Initiate fetching of bookmark. |
|
577 * @param aBookmarkItem Bookmark item to fetch. |
|
578 */ |
|
579 void FetchBookmarkL( const CFavouritesItem& aBookmarkItem ); |
|
580 |
|
581 /** |
|
582 * Initiate fetching of URL. |
|
583 * @param aUrl URL to fetch. |
|
584 * @param aUserName User name. |
|
585 * @param aPassword Password. |
|
586 * @param aAccessPoint AccessPoint. |
|
587 */ |
|
588 void FetchL |
|
589 ( |
|
590 const TDesC& aUrl, |
|
591 const TDesC& aUserName, |
|
592 const TDesC& aPassword, |
|
593 const TFavouritesWapAp& aAccessPoint, |
|
594 CBrowserLoadObserver::TBrowserLoadUrlType aUrlType |
|
595 = CBrowserLoadObserver::ELoadUrlTypeOther |
|
596 ); |
|
597 |
|
598 /** |
|
599 * Initiate fetching of URL with default AP, empty username and password. |
|
600 * @param aUrl URL to fetch. |
|
601 */ |
|
602 void FetchL( const TDesC& aUrl, CBrowserLoadObserver::TBrowserLoadUrlType aUrlType |
|
603 = CBrowserLoadObserver::ELoadUrlTypeOther ); |
|
604 |
|
605 /** |
|
606 * Cancel fetching. |
|
607 */ |
|
608 void CancelFetch( TBool aIsUserInitiated = EFalse ); |
|
609 |
|
610 /** |
|
611 * Starts animation. |
|
612 */ |
|
613 void StartProgressAnimationL(); |
|
614 |
|
615 /** |
|
616 * Stops animation. |
|
617 */ |
|
618 void StopProgressAnimationL(); |
|
619 |
|
620 /* |
|
621 * Return True if browser was launched especially into feeds view |
|
622 */ |
|
623 TBool BrowserWasLaunchedIntoFeeds() { return(iOverriddenLaunchContextId == EBrowserContextIdFeeds); } |
|
624 |
|
625 /* |
|
626 * record the overridden launch context id |
|
627 */ |
|
628 void SetOverriddenLaunchContextId(TUint aId) { iOverriddenLaunchContextId = aId; } |
|
629 |
|
630 |
|
631 #ifdef __RSS_FEEDS |
|
632 /** |
|
633 * Returns reference to FeedsClientUtilities. |
|
634 */ |
|
635 CFeedsClientUtilities& FeedsClientUtilities() const; |
|
636 #endif // __RSS_FEEDS |
|
637 |
|
638 |
|
639 /** |
|
640 * Returns the Uid of the previous active view from the view history. |
|
641 * @return Uid of the previous active view. |
|
642 */ |
|
643 TUid GetPreviousViewFromViewHistory(); |
|
644 |
|
645 /** |
|
646 * Return if Flash plugin is present in the system or not |
|
647 * @param none |
|
648 * @return TBool |
|
649 */ |
|
650 TBool FlashPresent( ); |
|
651 |
|
652 |
|
653 /** |
|
654 * Check state of LaunchHomePage command for dimmed state in options menu and shortcut keymap |
|
655 * @return ETrue is LaunchHomePage command should be dimmed in options menu and shortcut keymap |
|
656 * EFalse otherwise |
|
657 * @param none |
|
658 */ |
|
659 TBool IsLaunchHomePageDimmedL(); |
|
660 /** |
|
661 * Check from CCoeAppUi if a Dialog or Menu is diplayed on top of the view |
|
662 * @return ETrue if Dialog or Menu is displayed |
|
663 * EFalse otherwise |
|
664 * @param none |
|
665 */ |
|
666 TBool IsDisplayingMenuOrDialog(); |
|
667 |
|
668 |
|
669 public: // from MWindowInfoProvider |
|
670 |
|
671 HBufC* CreateWindowInfoLC( const CBrowserWindow& aWindow ) ; |
|
672 void SwitchWindowL(); |
|
673 |
|
674 /** |
|
675 * Initializes the browser, if it is in embedded mode. |
|
676 * In embedded mode the browser is initialized later, not when it |
|
677 * is constructed. First the browser must wait for the embedding |
|
678 * application to send the startup parameters, and only after that |
|
679 * can be initialized. |
|
680 * This method is required and used by new embedding architecture. |
|
681 */ |
|
682 void InitBrowserL(); |
|
683 |
|
684 /** |
|
685 * From CAknViewAppUi, CEikAppUi |
|
686 * Handles changes in keyboard focus when an |
|
687 * application switches to foreground |
|
688 * @param aForeground Is foreground event? |
|
689 */ |
|
690 void HandleForegroundEventL( TBool aForeground ); |
|
691 |
|
692 public: // From MDownloadedContentHandler |
|
693 |
|
694 virtual TBool HandleContentL( const TDesC& aFileName, |
|
695 const CAiwGenericParamList& aParamList, |
|
696 TBool& aContinue ); |
|
697 |
|
698 virtual TAny* DownloadedContentHandlerReserved1( TAny* /*aAnyParam*/ ); |
|
699 |
|
700 void SetContentHandlingResult( TBool aClientWantsToContinue, TBool aWasContentHandled ); |
|
701 |
|
702 /** |
|
703 * Loads the defined search page into content view. |
|
704 */ |
|
705 void LoadSearchPageL(); |
|
706 |
|
707 // This member is public, so BrowserLauncher.dll can close the browser. |
|
708 CBrowserAsyncExit *iBrowserAsyncExit; |
|
709 |
|
710 private: |
|
711 |
|
712 /** |
|
713 *Callback for late constructing of the SendUi in idle |
|
714 *Needed to provide better response time for the user |
|
715 *@return Returns 0 |
|
716 */ |
|
717 static TInt DelayedSendUiConstructL(TAny* aCBrowserAppUi); |
|
718 |
|
719 |
|
720 /** |
|
721 * Calls ProcessCommandParametersL with the given parameters. |
|
722 * @param aParams startup parameter (will be casted). |
|
723 * @return Returns 0 (called only once). |
|
724 */ |
|
725 //static TInt DelayedProcessParametersL( TAny* aParams ); |
|
726 |
|
727 /** |
|
728 * Callback function for CIdle. Calls DoStopDelay. |
|
729 * @param aCBrowserAppUi |
|
730 * @return Returns 0 (called only once). |
|
731 */ |
|
732 static TInt StopDelay( TAny* aCBrowserAppUi); |
|
733 |
|
734 /** |
|
735 * Stops CActiveSchedulerWait loop started |
|
736 * by ParseAndProcessParametersL(). |
|
737 */ |
|
738 void DoStopDelay(); |
|
739 |
|
740 /** |
|
741 *Construct SendUI now |
|
742 */ |
|
743 void DoConstructSendUiL(); |
|
744 |
|
745 /* |
|
746 * Changes the connection |
|
747 * @param |
|
748 * @return None. |
|
749 */ |
|
750 void ChangeConnectionL(); |
|
751 |
|
752 /* |
|
753 * send disconnect event to multiple windows |
|
754 */ |
|
755 void SendDisconnectEventL(); |
|
756 |
|
757 /** |
|
758 * Check if Flash plugin is present in the system or not |
|
759 * @param none |
|
760 * @return TBool |
|
761 */ |
|
762 TBool CheckFlashPresent( ); |
|
763 |
|
764 |
|
765 /** |
|
766 * Checks if a HomePage will be launched |
|
767 * @param none |
|
768 * @return TBool - ETrue if no homepage will be launched otherwise return EFalse |
|
769 */ |
|
770 TBool NoHomePageToBeLaunchedL(); |
|
771 |
|
772 /** |
|
773 * Show the name of browser and version of the browser |
|
774 * @param none |
|
775 */ |
|
776 void ShowNameAndVersionL(); |
|
777 |
|
778 /** |
|
779 * There's a homepage to be launched so start in content view |
|
780 * [Convenience function that gets used in 2 places] |
|
781 * @param none |
|
782 */ |
|
783 void StartFetchHomePageL(); |
|
784 |
|
785 |
|
786 protected: |
|
787 |
|
788 /** |
|
789 * Symbian OS constructor. |
|
790 */ |
|
791 void ConstructL(); |
|
792 |
|
793 /** |
|
794 * Sends Browser to the background. The task whose window group |
|
795 * is at the next ordinal position is brought up to the foreground. |
|
796 */ |
|
797 void SendBrowserToBackground(); |
|
798 |
|
799 /** |
|
800 * |
|
801 */ |
|
802 void DelayedConstructL(); |
|
803 |
|
804 /** |
|
805 * Clear the cache. |
|
806 */ |
|
807 void ClearTheCacheL(TBool afterQuery = EFalse, TBool aShowDoneNote = ETrue); |
|
808 |
|
809 |
|
810 /** |
|
811 * Delete cookies. |
|
812 */ |
|
813 void DeleteCookiesL(); |
|
814 |
|
815 |
|
816 /** |
|
817 * Delete Form and Password Data |
|
818 * @param aShowPromptAndComplete - show confirmation prompt and completion info note if True |
|
819 */ |
|
820 void ClearFormAndPasswdDataL(TBool aShowPromptAndComplete); |
|
821 |
|
822 |
|
823 /** |
|
824 * Clear History of all open windows |
|
825 */ |
|
826 void CBrowserAppUi::ClearHistoryL(); |
|
827 |
|
828 |
|
829 /** |
|
830 * Prompt before clearing history |
|
831 */ |
|
832 void CBrowserAppUi::ClearHistoryWithPromptL(); |
|
833 |
|
834 |
|
835 /** |
|
836 * Clear All Privacy Data |
|
837 */ |
|
838 void CBrowserAppUi::ClearAllPrivacyL(); |
|
839 |
|
840 /** |
|
841 * Disconnect. |
|
842 */ |
|
843 void DisconnectL(); |
|
844 |
|
845 /** |
|
846 * Updates the soft keys. Previously a callback in ViewShellObserver |
|
847 */ |
|
848 void UpdateSoftKeys(); |
|
849 /** |
|
850 * Logs a record of opened pages to Recent Url Store |
|
851 */ |
|
852 void LogAccessToRecentUrlL( CBrCtlInterface& aBrCtlInterface ); |
|
853 |
|
854 /** |
|
855 * Logs a record of requested pages to Recent Url Store |
|
856 */ |
|
857 void LogRequestedPageToRecentUrlL( const TDesC& aUrl ); |
|
858 |
|
859 /** |
|
860 * Load previous page from history (back button) |
|
861 * @since Series60 1.2 |
|
862 */ |
|
863 void HistoryLoadPrevious(); |
|
864 |
|
865 /** |
|
866 * Load next page from history (forward button) |
|
867 * @since Series60 1.2 |
|
868 */ |
|
869 void HistoryLoadNext(); |
|
870 |
|
871 /** |
|
872 * Creating a full url containing username, password, |
|
873 * server domain and document path. |
|
874 * @return buffer pointing to the url |
|
875 */ |
|
876 HBufC* CreateFullUrlLC( const TDesC& aUrl, |
|
877 const TDesC& aUsername, |
|
878 const TDesC& aPassword ); |
|
879 |
|
880 |
|
881 protected: // from MConnectionStageObserver |
|
882 /** |
|
883 * Connection stage achieved. |
|
884 */ |
|
885 void ConnectionStageAchievedL(); |
|
886 |
|
887 protected: // From CAknViewAppUi, CEikAppUi |
|
888 |
|
889 /** |
|
890 * Processes shell commands. |
|
891 * @param aCommand Command to process. |
|
892 * @return //TODO |
|
893 */ |
|
894 TBool ProcessCommandParametersL(TApaCommand aCommand,TFileName& /*aDocumentName*/,const TDesC8& /*aTail*/ ); |
|
895 |
|
896 |
|
897 /** |
|
898 * Handle the external message. |
|
899 * @param aClientHandleOfTargetWindowGroup Handle. |
|
900 * @param aMessageUid Message id. |
|
901 * @param aMessageParameters Message parameters. |
|
902 * @return Response to the message. |
|
903 */ |
|
904 MCoeMessageObserver::TMessageResponse HandleMessageL( TUint32 aClientHandleOfTargetWindowGroup, |
|
905 TUid aMessageUid, |
|
906 const TDesC8& aMessageParameters ); |
|
907 |
|
908 /** |
|
909 * Handles screen resolution changes |
|
910 */ |
|
911 void HandleResourceChangeL( TInt aType ); |
|
912 |
|
913 /** |
|
914 * Handles application specific events like OOM from window server. |
|
915 * @param aEventType The type of event. |
|
916 * @param aWsEvent window server event. |
|
917 * @return Key response. |
|
918 */ |
|
919 void HandleApplicationSpecificEventL(TInt aEventType, const TWsEvent& aWsEvent); |
|
920 |
|
921 private: |
|
922 |
|
923 TUint32 iRequestedAp; |
|
924 TBool iCalledFromAnotherApp; |
|
925 |
|
926 TBool iIsForeground; |
|
927 TUid iViewToBeActivatedIfNeeded; |
|
928 TUid iViewToReturnOnClose; |
|
929 |
|
930 TUid iLastViewId; |
|
931 TBool iSecureSiteVisited; |
|
932 |
|
933 |
|
934 CWmlBrowserBmOTABinSender* iSender; |
|
935 |
|
936 CConnectionStageNotifierWCB* iConnStageNotifier; |
|
937 |
|
938 CIdle* iIdle; // at construction phase |
|
939 CActiveSchedulerWait iWait; |
|
940 |
|
941 TBool iExitInProgress; |
|
942 |
|
943 RSocketServ iSockServSess; |
|
944 |
|
945 TBool iShutdownRequested; |
|
946 TBool iHTTPSecurityIndicatorSupressed; |
|
947 CRecentUrlStore* iRecentUrlStore; |
|
948 TInt iParametrizedLaunchInProgress; //ETrue when launch with parameters is in idling |
|
949 |
|
950 TBool iExitFromEmbeddedMode; |
|
951 |
|
952 // Flag to indicate that real downloading is |
|
953 // going on ( we are not loading from cache ) |
|
954 |
|
955 TBool iShowProgress; |
|
956 TBool iLongZeroPressed; |
|
957 TBool iStartedUp; |
|
958 TBool iFeatureManager; |
|
959 TBool iUserExit; |
|
960 TBool iPgNotFound; |
|
961 TBool iSuppressAlwaysAsk; |
|
962 TBool iFlashPresent; |
|
963 TBool iSpecialSchemeinAddress; |
|
964 |
|
965 RFavouritesSession iFavouritesSess; |
|
966 |
|
967 // The Uid of the embedding application. |
|
968 TUid iEmbeddingApplicationUid; |
|
969 |
|
970 TUid iPreviousView; |
|
971 TUid iCurrentView; |
|
972 |
|
973 // Uid for tracking what view the last CBA update was made under, |
|
974 // used to avoid extraneous updates |
|
975 TUid iLastCBAUpdateView; |
|
976 |
|
977 // Observing changes in PushMtm |
|
978 CBrowserPushMtmObserver* iPushMtmObserver; // owned |
|
979 |
|
980 // Record browser launch's overridden context id |
|
981 TUint iOverriddenLaunchContextId; |
|
982 |
|
983 TBool iBrowserAlreadyRunning; |
|
984 |
|
985 protected: |
|
986 |
|
987 CBrowserCommsModel* iCommsModel; |
|
988 CBrowserPreferences* iPreferences; |
|
989 |
|
990 MConnection* iConnection; |
|
991 |
|
992 CBrowserDialogsProvider* iDialogsProvider; |
|
993 CBrowserPopupEngine* iPopupEngine; |
|
994 CBrowserLauncherService* iBrowserLauncherService; // Not owned |
|
995 CActiveSchedulerWait iLauncherServiceWait; |
|
996 TBool iClientWantsToContinue; |
|
997 TBool iWasContentHandled; |
|
998 RArray<TUint>* iZoomLevelArray; |
|
999 TUint iCurrentZoomLevelIndex; |
|
1000 TUint iCurrentZoomLevel; |
|
1001 |
|
1002 CBrowserWindowManager* iWindowManager; |
|
1003 CIdle* iLateSendUi; |
|
1004 CBrowserBookmarksView* iBookmarksView; // not owned |
|
1005 #ifdef __RSS_FEEDS |
|
1006 CFeedsClientUtilities* iFeedsClientUtilities; |
|
1007 #endif // __RSS_FEEDS |
|
1008 }; |
|
1009 #endif |
|
1010 |
|
1011 // End of File |
|