Bug 90762 - [WK2] Add C API for Network Information API
Summary: [WK2] Add C API for Network Information API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 90781
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 01:16 PDT by Chris Dumez
Modified: 2012-07-18 14:22 PDT (History)
11 users (show)

See Also:


Attachments
Patch (15.67 KB, patch)
2012-07-09 02:30 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (11.12 KB, patch)
2012-07-12 22:57 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (11.10 KB, patch)
2012-07-12 23:36 PDT, Chris Dumez
gustavo: commit-queue-
Details | Formatted Diff | Diff
Patch (11.10 KB, patch)
2012-07-13 00:44 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-07-09 01:16:16 PDT
We need to add the C API for WKNetworkInfoManager and WKNetworkInfo.
We also need to add a C API function to WKContext to retrieve the NetworkInfo manager.
Comment 1 Chris Dumez 2012-07-09 02:30:11 PDT
Created attachment 151219 [details]
Patch
Comment 2 Chris Dumez 2012-07-09 05:37:38 PDT
Comment on attachment 151219 [details]
Patch

Clearing flag until dependency lands and the patch is rebased.
Comment 3 Chris Dumez 2012-07-12 22:57:16 PDT
Created attachment 152157 [details]
Patch

Rebase on master.
Comment 4 Grzegorz Czajkowski 2012-07-12 23:30:12 PDT
Comment on attachment 152157 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=152157&action=review

> Source/WebKit2/UIProcess/API/C/WKNetworkInfo.cpp:31
> +#if ENABLE(NETWORK_INFO)

It looks like toAPI() method is using when the macro is enabled. We can add macro for this include too.

> Source/WebKit2/UIProcess/API/C/WKNetworkInfo.cpp:37
> +WK_EXPORT WKTypeID WKNetworkInfoGetTypeID()

We can skip WK_EXPORT in cpp files.

> Source/WebKit2/UIProcess/API/C/WKNetworkInfo.cpp:46
> +WK_EXPORT WKNetworkInfoRef WKNetworkInfoCreate(double bandwidth, bool isMetered)

Ditto.
Comment 5 Chris Dumez 2012-07-12 23:36:03 PDT
Created attachment 152160 [details]
Patch

Take Grzegorz's feedback into consideration.
Comment 6 Gustavo Noronha (kov) 2012-07-12 23:50:10 PDT
Comment on attachment 152160 [details]
Patch

Attachment 152160 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/13202976
Comment 7 Early Warning System Bot 2012-07-12 23:52:56 PDT
Comment on attachment 152160 [details]
Patch

Attachment 152160 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13202000
Comment 8 Chris Dumez 2012-07-13 00:44:01 PDT
Created attachment 152172 [details]
Patch
Comment 9 Kenneth Rohde Christiansen 2012-07-13 04:26:45 PDT
Comment on attachment 152172 [details]
Patch

Looks good but maybe andersca wants to have a quick look
Comment 10 Gyuyoung Kim 2012-07-14 05:24:51 PDT
Comment on attachment 152172 [details]
Patch

Looks good to me too.
Comment 11 Thiago Marcos P. Santos 2012-07-17 12:10:22 PDT
Unit tests?
Comment 12 WebKit Review Bot 2012-07-18 14:22:11 PDT
Comment on attachment 152172 [details]
Patch

Clearing flags on attachment: 152172

Committed r123016: <http://trac.webkit.org/changeset/123016>
Comment 13 WebKit Review Bot 2012-07-18 14:22:22 PDT
All reviewed patches have been landed.  Closing bug.