The Story of



Lu Yuan
Jan 14, 2014

Basic Information

What: heX + Chromium


When: Dec 2013


Why:
  • Developer tools for heX as we develop web pages in Chrome.
  • An environment to debug Node.js.


    Goal: A solution for developing and debugging traditional web front and Node.js even more JavaScript host environments by the cross-platform way.
      

    In Comparison with

    Sameness

        • The same source code  
        • Chromium version  
        • Node.js version  
        • Architecture (IPC, ways of combining Node.js...)
        • Cross platform  


          In Comparison with

          Differentia

            • Process model
            • Program entry
            • Detachable Node.js

          How Chromium Displays Web Pages


          • WebContents
          • RenderWidget
          • RenderView


          • RenderWidgetHost
          • RenderViewHost




          Refer to: http://www.chromium.org/developers/design-documents/displaying-a-web-page-in-chrome

          How Chromium Displays Web Pages


          How Chromium Displays Web Pages


          Rebuild the Loop

          Rebuild uv_run()


          Message Loop is still the best option.



          decoupling

          • Message Loop
          • Render View



          Decoupling

          In Browser Process

          Base

          Message Loop does not know Node.js, renderer...
          Extend a method called UvRun() in the Message Pump

          Execute UvRun() in the loop each running, and do not care the content of UvRun() 

          Content

          Initialize Node.js arguments when renderer created

          Inherit a Message Loop instead of the default and implement UvRun() 

          In Renderer Process

          Content

          Attach Node.js' context in web page and run all Node.js' script


          Decoupling

          Made with Slides.com