Announcement

Collapse
No announcement yet.

Teaser: Chrome for AMS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Teaser: Chrome for AMS

    Hi everybody, long time ago I talked about implement Chromium with AMS, I was very interested to do with Chromium Embedded Framework, a GPL project by Marshall Greenblatt, but, previus versions works little bit low, but now CEF in the new version solves that and add much more performance.

    I've made a very simple object plugin with chromium, at the moment only support back, forward and seturl, but there are LOTS of things that could be done with that, functionality same as iexplorer plugin and many other things, for example, javascript support for direct lua usage, this means that you will can use javascript to run lua functions and input/output data. This allows to create awesome GUIs using webpages with real access to ams like actual objects.

    In addition, objects events like downloads, alerts/prompts, findings and so many others navigator events will be handled

    The speed of this navigator is awesome, try a web object and the sample, just like compare god with a gimpsy lol




    Known issues:
    - ~16mb of 5 dll must be placed in the root folder of app, and for developers, these dll have to be placed too in ams /data folder
    - When minimize and maximize, the navigator hides, but clicking or doing somthing works fine, this will be solved but doen't have enough time now.
    - Download not working because I deleted some things for compatibility

    Works very good, it's very very uncompleted, but works and prove my point

    Let me know things and suggestions

    PS: This haven't any relationship with the sh*t of chromeframe activex that i've published time ago, that just the complete navigator

    DOWNLOAD EXE SAMPLE: http://www.zshare.net/download/82759984a24209e1/

  • #2
    I'm downloading it right now! :yes

    Comment


    • #3
      Sweet. Just downloaded and it's working fast
      Hopefully you can add some functions like in the iExplorer plugin.

      Comment


      • #4
        Interesting stuff. Here is a link to the chromiumembedded google code page for anyone that is interested: http://code.google.com/p/chromiumembedded/

        Very interesting, it does seem as though the project has picked up some steam. Good luck with your plugin.
        MSI Factory The Next Generation Intelligent Setup Builder

        Comment


        • #5
          Hi guys, i'm testing the V8 core with Lua implemention, and there are great results, i'm creating a javascript bridge for lua, I have 2 ways to follow now:

          Scenario: There are a folder called /AutoPlay/webui/ on the project, this contain the application web UI and is accesible using (url)lua://ApplicationOne/file.ext -> (Render)/AutoPlay/webui/ApplicationOne/file.ext

          Method 1: Javascript bridge: There are a javascript handler to bridge lua
          <script>
          window.LUA.Call(["Application","Sleep"],5000);
          var Input1Value = window.LUA.Call(["Input","GetText"],"Input1");
          window.LUA.Call(["Input","SetText"],"Input2","Text Input1:"+Input1Value)
          </script>

          Method 2: Using <LUA> tags: Like other langs, evaluate monolithic code (ams is a great example of RAD)

          <h1>Input1 Value:</h1><br><lua>print(Input.GetText("Input1"))</lua><br>

          -----

          Obviously, each method ios very different, the first is dynamic and the second only work for page generation.

          The combination of them I think that will trow great results

          For security issues, I will change the wubui folder by a zip encripted file with custom password, this password must be passed to the plugin to work with webui

          Other way could be using only method 1 and registers the fuctions and variables that will be avalible in javascript

          just thinking
          Last edited by LucasTheDuck; 11-17-2010, 03:07 AM.

          Comment


          • #6
            Wow, i've handled GET and POST vars and now the navigator has a own appserver.

            For example lua://ApplicationTwo/Blog.htlua?Action=List&File=MyFile will generate the variables Get.Action="List"; Get.File="MyFile"; and somthing like with post vars Post.VariableName=VariableContent

            In addition, some other variables will be defined, like app_path, mothod, headers, document_root...

            webui is awesome

            Comment


            • #7
              Great news then, and also great work! I'll be waiting for you to release a finished version of this plugin :yes

              Comment


              • #8
                Whoa, javascript bindings are working now, these functios will work on namespace window.LUA.{FUNCTION}, and fuctions such as, GetString, GetInt, GetBool, GetTable, CallFunction, DoString, SetString, SetInt, SetBool, SetTable, and some others... please let me know if you have any suggestion



                For example you could insert files on a input of your browser doing:
                PHP Code:
                <input id="file"><br>
                <
                a href="javascript:var fileret=window.LUA.Call(['Dialog','FileBrowse'],'x','y','z'...); window.GetElementById('file').Value=fileret">Browse Files</a

                Comment


                • #9
                  Hi Lucas!
                  Nice work ! I dreamed about this plugin come to ams.
                  Waiting like a child your release !

                  Comment


                  • #10
                    this looks absoloutely awesome

                    Comment


                    • #11
                      Lucas, very nice!
                      Intrigued

                      Comment


                      • #12
                        That is really amazing, well done!
                        Bas Groothedde
                        Imagine Programming :: Blog

                        AMS8 Plugins
                        IMXLH Compiler

                        Comment


                        • #13
                          Thanks guys, CEF i've made some bad things with the sample object, first i've used a windowless object, and it is a mess with window events, and i've used CEF rev120, the new revision rev149 has a lot of changes, for example, the string changes from wstring (wide) to cefstring, and there are new classes for manage this string type... the hard part and the part with i spent more time, it's doing the conversion, but now it's so easy to do...

                          All my work can go to recycle bin, but it's a nice approach and test the point.

                          I'm working on CStatic derivated MFC class CChromiumEmmbedded and i'm using it with windowed object i'm very near to do it, but CEF has a lots of functions that have to be enhanced.

                          They are, for example:

                          * Back, Forward, Reload and Stop Load. Control navigation of browser.
                          * Undo, Redo, Cut, Copy, Paste, Delete, Select All. Control selection on the target frame.
                          * Print. Print the target frame.
                          * View Source. Save the target frame's HTML source to a temporary file and open it in the default text viewing application.
                          * Load URL. Load the specified URL into the target frame.
                          * Load String. Load the specified string into the target frame with an optionally specified dummy URL.
                          * Load Stream. Load the specified binary data into the target frame with an optionally specified dummy URL.
                          * Load Request. Load the specified request (URL, method, request data and headers) into the target frame.
                          * Execute JavaScript. Execute an arbitrary JavaScript command in the target frame.
                          And Events, like:

                          * Before Window Creation (HandleBeforeCreated). The application can cancel or customize the creation of browser windows.
                          * After Window Creation (HandleAfterCreated). The application can register custom CefJSHandler objects.
                          * Update Address Bar (HandleAddressChange). Change the address bar to the specified string. This is sent after navigation is committed and before the page has begun loading.
                          * Update Title (HandleTitleChange). Change the title to the specified string. This is sent while the page is loading.
                          * Before Browse (HandleBeforeBrowse). The application can cancel navigation. Information provided with this event includes the URL, post data and request headers.
                          * Load Start (HandleLoadStart). The browser is about to begin loading a URL.
                          * Load End (HandleLoadEnd). The browser has finished loading a URL.
                          * Load Error (HandleLoadError). An error has occurred during the load. The application can provide custom error pages.
                          * Before Resource Load (HandleBeforeResourceLoad). The browser is about to begin loading a resource. The application can provide an alternate data source (in-memory buffer, for instance) or cancel the load.
                          * Before Menu (HandleBeforeMenu). The browser is about to show a context menu. The application can either cancel the menu or show a custom menu in its place. The default behavior of the browser implementation is to show a basic context menu based on the disposition type.
                          * Get Menu Label (HandleGetMenuLabel). Called one time for each item in a default context menu before that menu is displayed. The application can change the text from the English default to something else (a different language, for instance).
                          * Menu Action (HandleMenuAction). The user has selected an action from the default context menu. The application can choose to handle the action in a custom manner.
                          * Print Options (HandlePrintOptions). Called before the print settings dialog is displayed to allow customization of paper size, orientation and margins.
                          * Print Header & Footer (HandlePrintHeaderFooter). Called after the web view is rendered to the print context but before the page is ended. The application can insert a custom header/footer string at any of six predefined locations (top left, top center, top right, bottom left, bottom center, bottom right) or do custom drawing on the print context. Information provided with this event includes the current URL, title, page number, total pages, print context, page bounding box and DPI scale factor.
                          * JavaScript Alert (HandleJSAlert). The application can customize the display of JavaScript alert messages.
                          * JavaScript Confirm (HandleJSConfirm). The application can customize the display of JavaScript confirm messages.
                          * JavaScript Prompt (HandleJSPrompt). The application can customize the display of JavaScript prompt messages.
                          * JavaScript Window Object Binding (HandleJSBinding). The application can attach user-defined method and variable handlers to a frame's JavaScript 'window' object.
                          * Before Window Close (HandleBeforeWindowClose). Called just before a browser window is closed.
                          * Take Focus (HandleTakeFocus). Called when the browser component is about to loose focus.
                          * Set Focus (HandleSetFocus). Called when the browser component is requesting focus.
                          * Key Event (HandleKeyEvent). Called when the browser component receives a keyboard event.
                          * Tooltips (HandleTooltip). Called to allow modification of tooltip text.
                          * Console Messages (HandleConsoleMessage). Called to display a console message.
                          * Find Results (HandleFindResult). Called to report find results for custom handling by the application.
                          In addition to these events, other things must be enhanced, for example, file download, prompts, dialogs... My intention is let AMS handle these things...

                          Note that this is a complete browser, it isn't a activex wrapper, so a lot of things must be defined for create it, they could be:

                          Code:
                          cache_path
                          user_agent
                          product_version
                          locale
                          extra_plugin_paths
                          
                          standard_font_family
                          fixed_font_family
                          serif_font_family
                          sans_serif_font_family
                          cursive_font_family
                          fantasy_font_family
                          default_encoding
                          user_style_sheet_location
                          
                          default_font_size
                          default_fixed_font_size 
                          minimum_font_size 
                          minimum_logical_font_size 
                          remote_fonts_disabled
                          
                          encoding_detector_enabled 
                              javascript_disabled 
                              javascript_open_windows_disallowed 
                              javascript_close_windows_disallowed 
                              javascript_access_clipboard_disallowed
                              dom_paste_disabled 
                              caret_browsing_enabled 
                              java_disabled
                              plugins_disabled
                              universal_access_from_file_urls_allowed
                              file_access_from_file_urls_allowed 
                              web_security_disabled 
                              xss_auditor_enabled 
                              image_load_disabled 
                              shrink_standalone_images_to_fit 
                              site_specific_quirks_disabled 
                              text_area_resize_disabled 
                              page_cache_disabled 
                              tab_to_links_disabled 
                              hyperlink_auditing_disabled 
                              user_style_sheet_enabled 
                          
                              author_and_user_styles_disabled 
                              local_storage_disabled 
                              databases_disabled 
                              application_cache_disabled 
                              experimental_webgl_enabled
                              accelerated_compositing_disabled 
                              accelerated_2d_canvas_disabled
                          Yes, it's a big deal, i think this part will be in propiets dialog with the default settings.

                          The major part of this is copy & paste things for do this enhancements, so if anybody want to help, you're welcome

                          I want to provide too fuctions to modify cookies.

                          All these things are basic integration things, but I'm keep working on javascript window.LUA bridge and a browser scheme, like lua://webui/app.lua, that can use lua files for do lua+xhtml files with GET&POST support and <lua>code</lua> tags enabled

                          I think that my hobby is beyond my hands, but i will try a little

                          any help?

                          Comment


                          • #14
                            Got working CEF Rev149 on AMS



                            Now, time to add lua functions and propierts dialog, for first functional alpha

                            Enhancements will be later added

                            Comment


                            • #15
                              lol matrix of browsers ~60mb with 9 windows, good performance

                              Comment

                              Working...
                              X