webengine/osswebengine/WebKit/s60/webview/WebFrame.cpp
branchRCL_3
changeset 70 8bfb9186a8b8
parent 67 4917f9bf7995
child 73 a1a5d4e727e8
equal deleted inserted replaced
67:4917f9bf7995 70:8bfb9186a8b8
   506     return result;
   506     return result;
   507 }
   507 }
   508 
   508 
   509 void WebFrame::makeVisiblePlugins(TBool visible)
   509 void WebFrame::makeVisiblePlugins(TBool visible)
   510 {    
   510 {    
   511     PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler();
   511     MWebCoreObjectWidget* view = NULL;  
   512     WTF::HashSet<PluginSkin*> pluginObjs = plghandler->pluginObjects();
   512     Frame* coreFrame = core(this); 
   513     for(WTF::HashSet<PluginSkin*>::iterator it = pluginObjs.begin() ;  it != pluginObjs.end() ; ++it ) {
   513     PluginSkin* plg = 0; 
   514         static_cast<PluginSkin*> (*it)->makeVisible(visible);
   514     for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { 
       
   515     
       
   516         PassRefPtr<HTMLCollection> objects = frame->document()->objects();      
       
   517         for (Node* n = objects->firstItem(); n; n = objects->nextItem()) { 
       
   518             view = widget(n);  
       
   519             if (view) { 
       
   520                 plg = static_cast<PluginSkin*>(view); 
       
   521                 plg->makeVisible(visible);
       
   522             } 
       
   523         } 
       
   524         PassRefPtr<HTMLCollection> embeds = frame->document()->embeds();        
       
   525         for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { 
       
   526             view = widget(n); 
       
   527             if (view) { 
       
   528                 plg = static_cast<PluginSkin*>(view); 
       
   529                 plg->makeVisible(visible);
       
   530             } 
       
   531         }
   515     }
   532     }
   516 }
   533 }
   517 
   534 
   518 
   535 
   519 inline int xInRect(const IntRect& r, int x)
   536 inline int xInRect(const IntRect& r, int x)
   575     }
   592     }
   576 }
   593 }
   577 
   594 
   578 void WebFrame::reCreatePlugins()
   595 void WebFrame::reCreatePlugins()
   579 {
   596 {
   580     PluginHandler* plghandler = StaticObjectsContainer::instance()->pluginHandler();
   597     MWebCoreObjectWidget* view = NULL;  
   581     WTF::HashSet<PluginSkin*> pluginObjs = plghandler->pluginObjects();
   598     Frame* coreFrame = core(this); 
   582     for(WTF::HashSet<PluginSkin*>::iterator it = pluginObjs.begin() ;  it != pluginObjs.end() ; ++it ) {
   599     PluginSkin* plg = 0; 
   583         PluginSkin* plg = static_cast<PluginSkin*> (*it); //->PlayPauseNotify(pause);
   600     for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) { 
   584         if(plg->activeStreams() > 0)
   601    
   585            plg->reCreatePlugin();
   602         PassRefPtr<HTMLCollection> objects = frame->document()->objects();      
       
   603         for (Node* n = objects->firstItem(); n; n = objects->nextItem()) { 
       
   604             view = widget(n);  
       
   605             if (view) { 
       
   606                 plg = static_cast<PluginSkin*>(view); 
       
   607                 if (plg->activeStreams() > 0)
       
   608                     plg->reCreatePlugin(); 
       
   609             } 
       
   610         } 
       
   611         PassRefPtr<HTMLCollection> embeds = frame->document()->embeds();        
       
   612         for (Node* n = embeds->firstItem(); n; n = embeds->nextItem()) { 
       
   613             view = widget(n); 
       
   614             if (view) { 
       
   615                 plg = static_cast<PluginSkin*>(view); 
       
   616                 if (plg->activeStreams() > 0)
       
   617                     plg->reCreatePlugin(); 
       
   618             } 
       
   619         }
   586     }
   620     }
   587 }
   621 }
   588 
   622 
   589 // END OF FILE
   623 // END OF FILE