Take a look at src/webkit/api/public.  WebKitClient has all the hooks back
into Chromium.  src/chrome/renderer/renderer_webkitclient_impl.h implements
the WebKitClient interface.
I'm not exactly sure how you want to design the interface.  If it's just a
function or two and you don't need to maintain any state, then you can just
add functions directly to the WebKitClient.  If you need anything more
complicated, you should create a new interface in src/webkit/api/public and
add a function to WebKitClient that creates an instance of it.

Patch set 8 here http://codereview.chromium.org/147248 might be a good
reference for how to use them.  (There's a lot there, but I think it should
be obvious which files you don't care about.)

For calling to the WebKitClient functions, you have two options.  You can
either implement WebCore:: functions in src/webkit/api/src or you can make
your webcore/platform/chromium code call ChromiumBridge.  If you can do the
former cleanly, I think it's the preferred approach.  The above CL does it
the latter way in src/webkit/api/src/StorageNamespaceProxy.h.

J

On Sun, Jul 19, 2009 at 12:21 AM, Mike Belshe <[email protected]> wrote:

> I want to log something from within webkit and have it show up in Chrome's
> log.  This seemingly basic operation seems to be unsupported in chromium's
> version of webkit?
> First off, WebKit does have WTFLogging facilities (see logging.h and
> assertions.h) which are similar to our LOG(XXX) faciities.   There appears
> to be no way to turn these on within the chromium build, because we don't
> implement nor call the initialization routine
> (InitializeLoggingChannelsIfNecessary()).  OK - I can implement that......
>
> But next, I want the logging to actually go to chrome's log file.  The
> function to change is Assertions.cpp:vprintf_stderr_common().  I can add an
> if PLATFORM(CHROMIUM) here, and that would work, but how can I call code
> back in chromium's base?
>
> I don't think I can do this?  It seems I should add something to
> WebKit/WebCore/platform/chromium/.... but - any references to base won't
> work, right?  The README from webkit/api specifically says I can't use base
> code (std types) in the chromium bridge.
>
> What is the right way to do this?
>
> Mike
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to