Replicate chrome request to store large data?

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Replicate chrome request to store large data?

Postby Stidor » Sun Mar 31, 2013 5:48 pm

Hi all,

I'd like to somehow allow the ability for websites to store large data permanently. When you visit a site that requires this in Chrome you get the following popup.

Image

After doing some searching I've seen a few mentions that with CEF3 it's not possible to adjust the local storage size from the default 5mb. Is this correct?
Stidor
Newbie
 
Posts: 3
Joined: Sun Mar 31, 2013 6:35 am

Re: Replicate chrome request to store large data?

Postby magreenblatt » Sun Mar 31, 2013 6:01 pm

Stidor wrote:After doing some searching I've seen a few mentions that with CEF3 it's not possible to adjust the local storage size from the default 5mb. Is this correct?

This is correct for localStorage, but there are a few different storage systems in the browser. Most likely you're interested in webkitStorageInfo.requestQuota instead of localStorage. requestQuota will result in a call to CefRequestHandler::OnQuotaRequest() from which you can allow or disallow the storage allocation request.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Replicate chrome request to store large data?

Postby Stidor » Sun Mar 31, 2013 6:50 pm

Ahh. That makes sense. I think that might be what I'm after then. Will have to do some research now to see how to handle calls to CefRequestHandler::OnQuotaRequest().

Not much sample code around, will browse through the demo code and see if anything similar is done there.
Stidor
Newbie
 
Posts: 3
Joined: Sun Mar 31, 2013 6:35 am

Re: Replicate chrome request to store large data?

Postby Stidor » Mon Apr 01, 2013 7:30 pm

I'm struggling a bit to figure out how to extend CefRequestHandler :/

I've got the browser control up and running in a project...but to extend it I'm scratching my head a little. I've been looking through the example code and some other snippets posted online. Found something kind of similar in a resourcefactory but it won't seem to let me extend CefRequestHandler that way.

Code: Select all
Private Sub createBrowser()
        Xilium.CefGlue.CefRuntime.Load()
        Dim mainArgs = New Xilium.CefGlue.CefMainArgs(New String() {})

        Dim cefSettings = New Xilium.CefGlue.CefSettings
        With cefSettings
            .SingleProcess = True
            .MultiThreadedMessageLoop = True
            .LogSeverity = Xilium.CefGlue.CefLogSeverity.Error
            '.LogFile = "C:\Projects\cefGlueDemo\cefGlueDemo\bin\Debug\CefGlue.log"
            .CachePath = "C:\Projects\cefGlueDemo\cefGlueDemo\bin\Debug\cache"
        End With

        CefRuntime.Initialize(mainArgs, cefSettings, Nothing)
    End Sub

    Private Sub loadBrowser()
        browserCtl = New CefWebBrowser

        browserCtl.Dock = DockStyle.Fill
        browserCtl.BringToFront()

        browserCtl.StartUrl = "http://www.google.com.au"

        Me.Controls.Add(browserCtl)
        browserCtl.CreateControl()
    End Sub
Stidor
Newbie
 
Posts: 3
Joined: Sun Mar 31, 2013 6:35 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 27 guests