Bug 40940 - Add message passing support to the WebKit2 API
Summary: Add message passing support to the WebKit2 API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 13:47 PDT by Sam Weinig
Modified: 2013-02-07 12:19 PST (History)
4 users (show)

See Also:


Attachments
patch (36.04 KB, patch)
2010-06-21 13:48 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-06-21 13:47:12 PDT
We need a generic string based message passing API for WebKit2 to communicate from the injected bundle to the WebContext and vice versa.
Comment 1 Sam Weinig 2010-06-21 13:48:14 PDT
Created attachment 59284 [details]
patch
Comment 2 WebKit Review Bot 2010-06-21 13:50:16 PDT
Attachment 59284 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebKit2/UIProcess/WebContextInjectedBundleClient.h:32:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
WebKit2/UIProcess/WebProcessProxy.cpp:140:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
WebKit2/UIProcess/WebContextInjectedBundleClient.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2010-06-21 14:11:09 PDT
Comment on attachment 59284 [details]
patch

> Index: WebKit2/ChangeLog
> ===================================================================
> --- WebKit2/ChangeLog	(revision 61572)
> +++ WebKit2/ChangeLog	(working copy)
> @@ -1,3 +1,55 @@
> +2010-06-21  Sam Weinig  <sam@webkit.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Patch for https://bugs.webkit.org/show_bug.cgi?id=40940
> +        Add message passing support to the WebKit2 API.
> +        
> +        Adds message passing for both InjectedBundle -> WebContex 
> +        and WebContex -> InjectedBundle.
> +

Tyop, "contex".

> +
> +// Messages sent from the web process to the WebProcessProxy.

Should this say "from the WebProcess"?

>  
> +void WebProcess::postMessageToInjectedBundle(const String& message)
> +{
> +    if (!m_injectedBundle)
> +        return;
> +
> +    m_injectedBundle->didRecieveMessage(message);
> +}

I think this should be named forwardMessageToInjectedBundle.

Looks good otherwise, r=me
Comment 4 Sam Weinig 2010-06-21 14:36:57 PDT
Landed in r61579.
Comment 5 WebKit Review Bot 2010-06-21 15:17:35 PDT
http://trac.webkit.org/changeset/61579 might have broken SnowLeopard Intel Release (Tests)
The following changes are on the blame list:
http://trac.webkit.org/changeset/61579
http://trac.webkit.org/changeset/61580
Comment 6 phanindra srungavarapu 2013-02-07 12:19:24 PST
So how do we do this? can anyone point me to any documentation on how to pass messages from webkitview to application?