Bug 125941 - Add Obj C API for injected bundle PageGroup class.
Summary: Add Obj C API for injected bundle PageGroup class.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 12:51 PST by Yongjun Zhang
Modified: 2013-12-18 15:47 PST (History)
4 users (show)

See Also:


Attachments
Add Obj C API (WKWebProcessPlugInPageGroup) for injected bundle PageGroup class. (17.14 KB, patch)
2013-12-18 12:57 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff
Use _bundlePageGroup->identifier() directly, instead of going through WFStringRef wrapper. (17.06 KB, patch)
2013-12-18 14:08 PST, Yongjun Zhang
mitz: review+
Details | Formatted Diff | Diff
Fix style issue and address review comments before landing. (17.23 KB, patch)
2013-12-18 15:11 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yongjun Zhang 2013-12-18 12:51:35 PST
Need an Obj C API for injected bundle PageGroup class, and a method to expose the page group object from WKWebProcessPlugInBrowsingContextController.
Comment 1 Yongjun Zhang 2013-12-18 12:57:18 PST
Created attachment 219562 [details]
Add Obj C API (WKWebProcessPlugInPageGroup) for injected bundle PageGroup class.
Comment 2 mitz 2013-12-18 13:21:45 PST
Comment on attachment 219562 [details]
Add Obj C API (WKWebProcessPlugInPageGroup) for injected bundle PageGroup class.

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

> Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:46
> +    WKStringRef string = toCopiedAPI(_bundlePageGroup->identifier());
> +    return [wrapper(*toImpl(string)) autorelease];

You should be able to just return _bundlePageGroup->identifier(), since WTF::String converts to an NSString *.
Comment 3 Yongjun Zhang 2013-12-18 14:08:47 PST
Created attachment 219566 [details]
Use _bundlePageGroup->identifier() directly, instead of going through WFStringRef wrapper.
Comment 4 mitz 2013-12-18 14:49:02 PST
Comment on attachment 219566 [details]
Use _bundlePageGroup->identifier() directly, instead of going through WFStringRef wrapper.

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

> Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:35
> +- (NSString *)identifier;

This is probably better expressed as @property (readonly) NSString *identifier;

> Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:34
> +#import "WKAPICast.h"
> +#import "WKNSString.h"
> +#import "WKRetainPtr.h"

Probably don’t need these anymore.

> Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:47
> +@property(readonly) WKWebProcessPlugInFrame *mainFrame;
> +
> +@property(readonly) WKWebProcessPlugInPageGroup *pageGroup;

There needs to be a space before the (, even though some existing code is wrong.
Comment 5 Yongjun Zhang 2013-12-18 15:11:37 PST
Created attachment 219576 [details]
Fix style issue and address review comments before landing.
Comment 6 WebKit Commit Bot 2013-12-18 15:47:02 PST
Comment on attachment 219576 [details]
Fix style issue and address review comments before landing.

Clearing flags on attachment: 219576

Committed r160803: <http://trac.webkit.org/changeset/160803>
Comment 7 WebKit Commit Bot 2013-12-18 15:47:04 PST
All reviewed patches have been landed.  Closing bug.