webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp
branchRCL_3
changeset 92 e1bea15f9a39
parent 91 30342f40acbf
child 93 79859ed3eea9
equal deleted inserted replaced
91:30342f40acbf 92:e1bea15f9a39
    88 #include "HttpUiCallbacks.h"
    88 #include "HttpUiCallbacks.h"
    89 #include "PluginWin.h"
    89 #include "PluginWin.h"
    90 #include "GCController.h"
    90 #include "GCController.h"
    91 #include <BrowserVersion.h>
    91 #include <BrowserVersion.h>
    92 #include <cuseragent.h>
    92 #include <cuseragent.h>
       
    93 #include "kjs_window.h" 
    93 
    94 
    94 #ifndef BRDO_WML_DISABLED_FF
    95 #ifndef BRDO_WML_DISABLED_FF
    95 #include "wmlinterface.h"
    96 #include "wmlinterface.h"
    96 #include "WmlInterfaceImpl.h"
    97 #include "WmlInterfaceImpl.h"
    97 #include "WmlEngineInterface.h"
    98 #include "WmlEngineInterface.h"
   420    , m_pageLoadFinished(false)
   421    , m_pageLoadFinished(false)
   421    , m_wmlEngineInterface(NULL)
   422    , m_wmlEngineInterface(NULL)
   422    , m_brCtlDownloadObserver(aBrCtlDownloadObserver)
   423    , m_brCtlDownloadObserver(aBrCtlDownloadObserver)
   423    , m_windoCloseTimer(NULL)
   424    , m_windoCloseTimer(NULL)
   424    , m_didFirstLayout(false)
   425    , m_didFirstLayout(false)
       
   426    , m_NotifyPluginFocusChangeEvent(false)
   425 {
   427 {
   426     m_documentHeight = 0;
   428     m_documentHeight = 0;
   427     m_displayHeight = 0;
   429     m_displayHeight = 0;
   428     m_displayPosY = 0;
   430     m_displayPosY = 0;
   429     m_documentWidth = 0;
   431     m_documentWidth = 0;
   673                 break;
   675                 break;
   674             }
   676             }
   675         case TBrCtlDefs::ECommandCancelFetch:
   677         case TBrCtlDefs::ECommandCancelFetch:
   676             {
   678             {
   677                 m_webView->Stop();
   679                 m_webView->Stop();
       
   680                 break;
       
   681             }
       
   682 
       
   683         case TBrCtlDefs::ECommandOOMExit:
       
   684             {
       
   685                 WebCore::gcController().startedExit(true); 
       
   686                 KJS::setDeferringJSTimers(true); 
   678                 break;
   687                 break;
   679             }
   688             }
   680 
   689 
   681         case TBrCtlDefs::ECommandShowThumbnailView:
   690         case TBrCtlDefs::ECommandShowThumbnailView:
   682             {
   691             {
  1036            }
  1045            }
  1037 
  1046 
  1038 	   // Messages sent by OOM monitor
  1047 	   // Messages sent by OOM monitor
  1039        case TBrCtlDefs::ECommandFreeMemory:
  1048        case TBrCtlDefs::ECommandFreeMemory:
  1040            {
  1049            {
  1041            //MemoryManager::FreeRam(); // invoke memory collect operation - enable later, causes BC break
  1050            MemoryManager::FreeRam(); // invoke memory collect operation
  1042            break;
  1051            break;
  1043            }
  1052            }
  1044        case TBrCtlDefs::ECommandMemoryGood:
  1053        case TBrCtlDefs::ECommandMemoryGood:
  1045            {
  1054            {
  1046            //MemoryManager::RestoreCollectors(); // restore collectors - enable later, causes BC break
  1055            MemoryManager::RestoreCollectors(); // restore collectors
       
  1056            break;
       
  1057            }
       
  1058        case TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent:
       
  1059            {
       
  1060            m_NotifyPluginFocusChangeEvent = true;
  1047            break;
  1061            break;
  1048            }
  1062            }
  1049                   
  1063                   
  1050       default:
  1064       default:
  1051             {
  1065             {
  1077                 }
  1091                 }
  1078             }
  1092             }
  1079         }
  1093         }
  1080 }
  1094 }
  1081 
  1095 
       
  1096 
       
  1097 EXPORT_C TBool CBrCtl::IsSynchRequestPending()
       
  1098     {
       
  1099     return m_webView->isSynchRequestPending();
       
  1100     }
       
  1101 
       
  1102 
  1082 // -----------------------------------------------------------------------------
  1103 // -----------------------------------------------------------------------------
  1083 // CBrCtl::HandleDownloadCommandL
  1104 // CBrCtl::HandleDownloadCommandL
  1084 // This method calls to download manager in order to send commands to the DlMgr
  1105 // This method calls to download manager in order to send commands to the DlMgr
  1085 // -----------------------------------------------------------------------------
  1106 // -----------------------------------------------------------------------------
  1086 //
  1107 //
  1280     // Give the plugin a chance to add its option menu items, send the Command Id
  1301     // Give the plugin a chance to add its option menu items, send the Command Id
  1281     // Base we're using for the plug-ins
  1302     // Base we're using for the plug-ins
  1282     // tot fixme
  1303     // tot fixme
  1283     //TPluginControl pluginControl(*iWebKitControl);
  1304     //TPluginControl pluginControl(*iWebKitControl);
  1284     //pluginControl.AddPluginOptionMenuItemsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter);
  1305     //pluginControl.AddPluginOptionMenuItemsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter);
  1285     PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
  1306     if(m_webView) {
  1286     if(plugin && plugin->pluginWin())
  1307         PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
  1287         plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
  1308         if(plugin && plugin->pluginWin())
       
  1309             plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
       
  1310     }
  1288 
  1311 
  1289 }
  1312 }
  1290 
  1313 
  1291 // -----------------------------------------------------------------------------
  1314 // -----------------------------------------------------------------------------
  1292 // CBrCtl::ClearCache
  1315 // CBrCtl::ClearCache
  1884         if(!visible){
  1907         if(!visible){
  1885         m_webView->mainFrame()->frameLoader()->stopRedirectionTimerNow();
  1908         m_webView->mainFrame()->frameLoader()->stopRedirectionTimerNow();
  1886         }
  1909         }
  1887         else if(m_webView->mainFrame()->frameLoader()->checkScheduledRedirection())
  1910         else if(m_webView->mainFrame()->frameLoader()->checkScheduledRedirection())
  1888           m_webView->mainFrame()->frameLoader()->startRedirectionTimerNow();
  1911           m_webView->mainFrame()->frameLoader()->startRedirectionTimerNow();
       
  1912         
       
  1913         if( m_NotifyPluginFocusChangeEvent ) {
       
  1914            m_NotifyPluginFocusChangeEvent = false; 
       
  1915            webView()->mainFrame()->notifyPluginFocusChangeEvent(visible);
       
  1916           }
  1889         m_webView->MakeVisible(visible);
  1917         m_webView->MakeVisible(visible);
  1890     }
  1918     }
  1891 
  1919 
  1892     if( visible && !isvisible && m_webView ) {
  1920     if( visible && !isvisible && m_webView ) {
  1893         m_webView->checkForZoomChange();
  1921         m_webView->checkForZoomChange();