Using the Chromium WebKit API

500 views
Skip to first unread message

Ben M

unread,
Jun 28, 2011, 9:43:20 AM6/28/11
to Chromium-dev
I am currently trying to figure out how to use Chromium's WebKit API
in a Windows C++ application. I have a few questions about the API and
was wondering if you could help me answer them. I did search through a
few of the groups associated with the Chromium project, but really
didn't find a solid answer to these.

* It appears that some of the API has been implemented and the rest
are just pure virtual interfaces. Do all of the virtual interfaces
need to be implemented in order for us to use the API?
* How does the glue layer fit into the API? Is the glue layer being
replaced by the new API?
* Is there a way to use the Chromium browser implementation's of the
API as examples to implement the API in another application? If so,
where would be a good place to start?
* Currently, to build WebKit, you have to pull down a full checkout of
Chromium. Is there a way to configure a .gclient file to pull down
only the dependencies required to build the WebKit port?

Thanks,
Ben

Darin Fisher

unread,
Jun 28, 2011, 10:25:42 AM6/28/11
to bjm....@gmail.com, Chromium-dev

Take a look at the test_shell project in the chromium repository.  That provides simpler, single-process implementations of the webkit interfaces.

As for minimizing what you pull from chromium, take a look at the DEPS file in WebKit/chromium to see which subdirectories are actually needed from Chromium.

On Jun 28, 2011 6:43 AM, "Ben M" <bjm....@gmail.com> wrote:

Ben M

unread,
Jun 28, 2011, 11:11:55 AM6/28/11
to Chromium-dev
Hi Darin,

In one of your talks you gave a while back about the API, you had put
up a slide that said an embedder would have to use the following steps
to get started:

- Implement the WebKitClient interface
- call WebKit::initialize(&myclient)
- Implement WebViewClient interface
- call WebView::create()
- Implement WebFrameClient and call view-
>initializeMainFrame()

I wrote some base code to do that and it appears to compile and run,
however it does not seem to load a request after calling
loadRequest(). I did follow some examples in the test_shell for
initialization, however it hangs when the resource loader attempts to
load the request. The status changes from PENDING to ERROR when
stepping through the debugger.

Thanks
> On Jun 28, 2011 6:43 AM, "Ben M" <bjm.w...@gmail.com> wrote:

Evan Martin

unread,
Jun 28, 2011, 11:55:37 AM6/28/11
to bjm....@gmail.com, Chromium-dev
This doesn't answer any of your questions, but you might find more
success starting wth
http://code.google.com/p/chromiumembedded/

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
>    http://groups.google.com/a/chromium.org/group/chromium-dev
>

Ben

unread,
Jun 29, 2011, 12:40:49 PM6/29/11
to Chromium-dev
I am currently trying to use Chromium Embedded Framework, however the
binary releases do not ship with the debug PDB files, making debugging
internal errors difficult. I found a discussion in another group
thread saying that test_shell was not as efficient as Chromium itself.
If this is the case, is there another way to utilize the public API?

On Jun 28, 10:55 am, Evan Martin <e...@chromium.org> wrote:
> This doesn't answer any of your questions, but you might find more
> success starting wthhttp://code.google.com/p/chromiumembedded/
>
>
>
>
>
>
>
> On Tue, Jun 28, 2011 at 6:43 AM, Ben M <bjm.w...@gmail.com> wrote:
> > I am currently trying to figure out how to use Chromium's WebKit API
> > in a Windows C++ application. I have a few questions about the API and
> > was wondering if you could help me answer them. I did search through a
> > few of the groups associated with the Chromium project, but really
> > didn't find a solid answer to these.
>
> > * It appears that some of the API has been implemented and the rest
> > are just pure virtual interfaces. Do all of the virtual interfaces
> > need to be implemented in order for us to use the API?
> > * How does the glue layer fit into the API? Is the glue layer being
> > replaced by the new API?
> > * Is there a way to use the Chromium browser implementation's of the
> > API as examples to implement the API in another application? If so,
> > where would be a good place to start?
> > * Currently, to build WebKit, you have to pull down a full checkout of
> > Chromium. Is there a way to configure a .gclient file to pull down
> > only the dependencies required to build the WebKit port?
>
> > Thanks,
> > Ben
>
> > --
> > Chromium Developers mailing list: chromium-...@chromium.org

Jeremy Orlow

unread,
Jun 29, 2011, 3:41:34 PM6/29/11
to bjm....@gmail.com, Chromium-dev, Marshall Greenblatt
On Wed, Jun 29, 2011 at 9:40 AM, Ben <bjm....@gmail.com> wrote:
I am currently trying to use Chromium Embedded Framework, however the
binary releases do not ship with the debug PDB files, making debugging
internal errors difficult.

Can't you just compile it yourself?  It should all be open source.  You could also ask Marshall to ship pdb's as well.
 
I found a discussion in another group
thread saying that test_shell was not as efficient as Chromium itself.

Sure, but it's a good place to start if you're trying to learn about the API.
 
If this is the case, is there another way to utilize the public API?

You can see precisely how the Chromium API is used by looking at the Chromium source code.

...but I really think the CEF is what you want here.

J
 
Chromium Developers mailing list: chromi...@chromium.org
Reply all
Reply to author
Forward
0 new messages