yueying0083 / javachromiumembedded

Automatically exported from code.google.com/p/javachromiumembedded
0 stars 0 forks source link

Added CefURLRequest handling to be able to create browser independent HTTP-requests #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This issue is an enhancement of JCEF - STEP 3  (patch 6 of 10) 
--------------------------------------------------------------
Please see issue 55 for the overall plan.

Purpose: Added CefURLRequest handling to be able to create browser independent 
HTTP-requests

This patch relies on the attached patch file of  issue #84. 
If you want to try these code changes, add the patch of issue #84 first and 
afterwards add the patch file attached to this issue. Otherwise you'll get some 
patch-errors.

Brief overview (only important changes are listed):
---------------------------------------------------
This patch adds the following classes to JCEF:
  package org.cef.callback
    CefURLRequestClient

  package org.cef.network
    CefURLRequest

And adds the following methods to existing classes:
  --

Added Tests to MainFrame example application:
---------------------------------------------
- Menu > File > URL Request
   (this will open a new dialog (UrlRequestDialog))

Known Issue:
------------
There seems to be a bug within the CEF implementation for Mac because the native
method call CefURLRequest::Create(request, client.get()); always returns NULL.

On Windows all works fine.

Original issue reported on code.google.com by k...@censhare.de on 14 May 2014 at 2:15

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 23 May 2014 at 6:31

GoogleCodeExporter commented 9 years ago
> There seems to be a bug within the CEF implementation for Mac because the 
native
> method call CefURLRequest::Create(request, client.get()); always returns NULL.

CefURLRequest::Create needs to be called on one of the known CEF threads (UI, 
IO, etc). Probably it's being called on on an arbitrary Java thread. We can fix 
it in a follow-up commit.

Also, the URL request test is pretty awesome! Could be used as a stand-alone 
app :).

Added in revision 66.

Original comment by magreenb...@gmail.com on 23 May 2014 at 7:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@comment#2: Thank you Marshall for that useful hint.

I've build a solution which works on Windows and Mac as well by executing the 
CefURLRequest on a thread known by CEF.

Original comment by k...@censhare.de on 28 May 2014 at 6:17

GoogleCodeExporter commented 9 years ago
Here is the patch file to comment #4

Original comment by k...@censhare.de on 28 May 2014 at 7:15

Attachments:

GoogleCodeExporter commented 9 years ago
@#5: Thanks, added in revision 76.

Original comment by magreenb...@gmail.com on 17 Jun 2014 at 4:37