webengine/osswebengine/WebKit/s60/webcoresupport/WebChromeClient.cpp
branchRCL_3
changeset 94 919f36ff910f
parent 93 79859ed3eea9
equal deleted inserted replaced
93:79859ed3eea9 94:919f36ff910f
    27 #include "WebFrame.h"
    27 #include "WebFrame.h"
    28 #include "WebUtil.h"
    28 #include "WebUtil.h"
    29 #include "FrameLoadRequest.h"
    29 #include "FrameLoadRequest.h"
    30 #include "kjs_proxy.h"
    30 #include "kjs_proxy.h"
    31 #include "kjs_binding.h"
    31 #include "kjs_binding.h"
    32 #include <StringLoader.h>
    32 #include <stringloader.h>
    33 #include <Webkit.rsg>
    33 #include <Webkit.rsg>
    34 
    34 
    35 
    35 
    36 
    36 
    37 #include <centralrepository.h>
    37 #include <centralrepository.h>
    38 #include <BrowserUiSDKCRKeys.h>
    38 #include <browseruisdkcrkeys.h>
    39 
    39 
    40 const TInt KMaxJavaLogMsgLen = 500;
    40 const TInt KMaxJavaLogMsgLen = 500;
    41 const TInt KMaxJavaLogMsgPaddingLen = 0x200; // for paddings in JS log message such as: log type and labels.
    41 const TInt KMaxJavaLogMsgPaddingLen = 0x200; // for paddings in JS log message such as: log type and labels.
    42 const TInt KMaxJSLogFileSize = 0x100000;
    42 const TInt KMaxJSLogFileSize = 0x100000;
    43 
    43 
   183     CRepository* rep = CRepository::NewL( KCRUidBrowser );
   183     CRepository* rep = CRepository::NewL( KCRUidBrowser );
   184     rep->Get( KBrowserNGScriptLog, scriptLogType );
   184     rep->Get( KBrowserNGScriptLog, scriptLogType );
   185     delete rep;
   185     delete rep;
   186 
   186 
   187     if ( scriptLogType == TBrCtlDefs::EScriptLogDisable )
   187     if ( scriptLogType == TBrCtlDefs::EScriptLogDisable )
       
   188 	{
       
   189 	    fsSession.Close();
   188         return;
   190         return;
       
   191 	}
   189     TBool needLogFile = EFalse, needLogConsole = EFalse;
   192     TBool needLogFile = EFalse, needLogConsole = EFalse;
   190 
   193 
   191     // construct the log message
   194     // construct the log message
   192     HBufC* log_msg = HBufC::NewLC(KMaxJavaLogMsgPaddingLen + message.length() + srcURL.Length());
   195     HBufC* log_msg = HBufC::NewLC(KMaxJavaLogMsgPaddingLen + message.length() + srcURL.Length());
   193     TPtr log_msg_str = log_msg->Des();
   196     TPtr log_msg_str = log_msg->Des();
   360 void WebChromeClient::setElementVisibilityChanged(bool visibility) {
   363 void WebChromeClient::setElementVisibilityChanged(bool visibility) {
   361     m_visibility = visibility;
   364     m_visibility = visibility;
   362     m_visibilityByMouse = m_visibility && m_webView->isMouseEventFired();
   365     m_visibilityByMouse = m_visibility && m_webView->isMouseEventFired();
   363     m_visibilityByKey = m_visibility && m_webView->isKeyEventFired();
   366     m_visibilityByKey = m_visibility && m_webView->isKeyEventFired();
   364 }
   367 }
       
   368 
       
   369 
       
   370 void WebChromeClient::wait(double t) 
       
   371 { 
       
   372     m_webView->wait(t); 
       
   373 }