How do I Plugin Chrome into my Application

Built a cool app using CEF that you'd like to share with the community? Talk about it here.

How do I Plugin Chrome into my Application

Postby anishphilip » Wed Feb 24, 2010 6:10 am

I went through CEF and found it interesting. The interactions with the browser inside our application could be divided into the following

1. Events coming from the browser - NavigateComplete, DocumentComplete et al
2. Traversal and Operations on the DOM
3. Navigations on the Page - click, get et al
4. Cookie Access
5. Message Box and Internet Error Dialog Handling

After going through the documentation and the source for the client code I guess we only have support for 1 and 3 above. I wanted to check if we can use CEF to access the DOM and for operations 4 and 5.
anishphilip
Newbie
 
Posts: 8
Joined: Wed Feb 24, 2010 6:05 am

Re: How do I Plugin Chrome into my Application

Postby magreenblatt » Wed Feb 24, 2010 11:45 am

2. Traversal and Operations on the DOM

Work is currently in progress on adding support for directly accessing the DOM via CEF. In the mean time you can access the DOM indirectly using JavaScript and a V8 extension.

viewtopic.php?f=7&t=52
http://code.google.com/p/chromiumembedd ... tail?id=32

4. Cookie Access

How exactly do you want to access cookies, and what do you want to do with them?

5. Message Box and Internet Error Dialog Handling

JavaScript dialogs can be customized using the CefBrowser::HandleJS* methods. What other dialogs are you looking to customize?
magreenblatt
Site Admin
 
Posts: 9850
Joined: Fri May 29, 2009 6:57 pm

Re: How do I Plugin Chrome into my Application

Postby anishphilip » Thu Feb 25, 2010 4:17 am

I would like to get and set the cookie, something similar to IHTMLDocument2.getCookie and IHTMLDocument2.setCookie(...) in IE, and

BOOL InternetGetCookie(
__in LPCTSTR lpszUrl,
__in LPCTSTR lpszCookieName,
__out LPTSTR lpszCookieData,
__inout LPDWORD lpdwSize
);

in Windows. I guess I would be able to do this once the DOM is made accessible?

As far as message boxes are concerned, our only intention is to have the ability to read the contents of the message and click an the OK/CANCEL/RETRY buttons appropriately. For Internet error dialogs we should be able to decipher the code and the message associated with the error code
anishphilip
Newbie
 
Posts: 8
Joined: Wed Feb 24, 2010 6:05 am

Re: How do I Plugin Chrome into my Application

Postby magreenblatt » Thu Feb 25, 2010 9:42 am

I guess I would be able to do this once the DOM is made accessible?

Some cookie manipulation can be done using the DOM. The proposed Chrome Extensions Cookie API might also be of interest to you.
http://groups.google.com/a/chromium.org ... 792f1071fe

For Internet error dialogs we should be able to decipher the code and the message associated with the error code

CEF does not have internet error dialogs. You can handle load errors currently using CefBrowser::HandleLoadError().
magreenblatt
Site Admin
 
Posts: 9850
Joined: Fri May 29, 2009 6:57 pm

Re: How do I Plugin Chrome into my Application

Postby anishphilip » Fri Feb 26, 2010 11:50 pm

Thanks Marshall for your reply. I was wondering if we have a timeline for DOM access support?
anishphilip
Newbie
 
Posts: 8
Joined: Wed Feb 24, 2010 6:05 am

Re: How do I Plugin Chrome into my Application

Postby anishphilip » Sat May 14, 2011 1:13 am

Work is currently in progress on adding support for directly accessing the DOM via CEF. In the mean time you can access the DOM indirectly using JavaScript and a V8 extension.



Hi Marshall, Could you give me an update on the DOM support that you referred to in the above update. ?
anishphilip
Newbie
 
Posts: 8
Joined: Wed Feb 24, 2010 6:05 am

Re: How do I Plugin Chrome into my Application

Postby magreenblatt » Sat May 14, 2011 10:03 am

anishphilip wrote:
Work is currently in progress on adding support for directly accessing the DOM via CEF. In the mean time you can access the DOM indirectly using JavaScript and a V8 extension.



Hi Marshall, Could you give me an update on the DOM support that you referred to in the above update. ?

Support was added a while ago. Take a look at the CefDOM* classes.
magreenblatt
Site Admin
 
Posts: 9850
Joined: Fri May 29, 2009 6:57 pm


Return to Apps Discussion

Who is online

Users browsing this forum: No registered users and 1 guest