webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp
branchRCL_3
changeset 47 e1bea15f9a39
parent 46 30342f40acbf
child 48 79859ed3eea9
--- a/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp	Thu Jul 15 19:53:20 2010 +0300
+++ b/webengine/osswebengine/WebKit/s60/webview/BrCtl.cpp	Thu Aug 19 10:58:56 2010 +0300
@@ -90,6 +90,7 @@
 #include "GCController.h"
 #include <BrowserVersion.h>
 #include <cuseragent.h>
+#include "kjs_window.h" 
 
 #ifndef BRDO_WML_DISABLED_FF
 #include "wmlinterface.h"
@@ -422,6 +423,7 @@
    , m_brCtlDownloadObserver(aBrCtlDownloadObserver)
    , m_windoCloseTimer(NULL)
    , m_didFirstLayout(false)
+   , m_NotifyPluginFocusChangeEvent(false)
 {
     m_documentHeight = 0;
     m_displayHeight = 0;
@@ -678,6 +680,13 @@
                 break;
             }
 
+        case TBrCtlDefs::ECommandOOMExit:
+            {
+                WebCore::gcController().startedExit(true); 
+                KJS::setDeferringJSTimers(true); 
+                break;
+            }
+
         case TBrCtlDefs::ECommandShowThumbnailView:
             {
                 if (m_webView->pageView()) {
@@ -1038,12 +1047,17 @@
 	   // Messages sent by OOM monitor
        case TBrCtlDefs::ECommandFreeMemory:
            {
-           //MemoryManager::FreeRam(); // invoke memory collect operation - enable later, causes BC break
+           MemoryManager::FreeRam(); // invoke memory collect operation
            break;
            }
        case TBrCtlDefs::ECommandMemoryGood:
            {
-           //MemoryManager::RestoreCollectors(); // restore collectors - enable later, causes BC break
+           MemoryManager::RestoreCollectors(); // restore collectors
+           break;
+           }
+       case TBrCtlDefs::ECommandNotifyPluginFocusChangeEvent:
+           {
+           m_NotifyPluginFocusChangeEvent = true;
            break;
            }
                   
@@ -1079,6 +1093,13 @@
         }
 }
 
+
+EXPORT_C TBool CBrCtl::IsSynchRequestPending()
+    {
+    return m_webView->isSynchRequestPending();
+    }
+
+
 // -----------------------------------------------------------------------------
 // CBrCtl::HandleDownloadCommandL
 // This method calls to download manager in order to send commands to the DlMgr
@@ -1282,9 +1303,11 @@
     // tot fixme
     //TPluginControl pluginControl(*iWebKitControl);
     //pluginControl.AddPluginOptionMenuItemsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter);
-    PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
-    if(plugin && plugin->pluginWin())
-        plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
+    if(m_webView) {
+        PluginSkin* plugin = m_webView->mainFrame()->focusedPlugin();
+        if(plugin && plugin->pluginWin())
+            plugin->pluginWin()->addPluginOptionsL(aMenuPane, TBrCtlDefs::ECommandIdPluginBase, aAfter );
+    }
 
 }
 
@@ -1886,6 +1909,11 @@
         }
         else if(m_webView->mainFrame()->frameLoader()->checkScheduledRedirection())
           m_webView->mainFrame()->frameLoader()->startRedirectionTimerNow();
+        
+        if( m_NotifyPluginFocusChangeEvent ) {
+           m_NotifyPluginFocusChangeEvent = false; 
+           webView()->mainFrame()->notifyPluginFocusChangeEvent(visible);
+          }
         m_webView->MakeVisible(visible);
     }