You are viewing...

Google Chrome Adventures

Updated on November 30, 2014 at the 02th hour
Posted under:

DISCLAIMER: All views are considered my own and you should not draw any conclusions on associates.

Looks like it is one of those times of the year where I am deeply enveloped in a project. This is one of those projects where you build on top of what someone else created rather than start completely from scratch. Yeah, I know blank slate is always better, but there is nooooo way I will create my own browser.

Let's go through what I've been doing. The idea is to control a browser to do what I want it to do, such that it can be used in a work project. The browser I chose is Google Chrome and that's mainly because the most updated version of flash is included with it on Linux.

The first solution was to use Selenium where it will start up a chrome instance using the chrome driver then uses the web driver interface to tell the browser what to do. Problem solved!

Nope, I need to be able to do some specific things such as before caputring the request before it is fired off.

Selenium is great, but with an out of the box Chrome instance? Meh, can not do much request/response capturing. Okay...

Let's add a proxy serve and have Chrome connect to it! Yup, now we can inspect requests before they go out to the network and responses as they come in. Woohoo!

Nope, specifically capture the request before it leaves the browser due to some unsupported protocols.

Okay, so let's google for something that will let us control the browser internally where hopefully we can eliminate the proxy even.

JCEF (Java Chromium Embedded Framework) is a piece of work. This was love at first sight. Just imagine being able to put a chrome instance wherever you wanted it! Basically lets you do whatever you want with it. When I first installed it, I was back into reality. It is plagued with issues for Ubuntu 12 and 14. Biting the bullet as usual for linux builds, I stick with it and keep going until I solve or ignore the issues wherever possible. I get to the point where I can finally start the browser and one issue plagues it where it will not start sometimes. Unacceptable! It doesn't support flash on top of that no matter how I tried to include it, but I will cut that part slack given, I posted on the forums about it, it needs a paid license from ADOBE. WTF?! It's dumb, no one is going to implement the ppapi for flash if it isn't open source/free license. Good job Adobe! Flash is a hard requirement unfortunately, so good bye CEF!

Okay, soooo what to do? BUILD MY OWN CHROMIUM BROWSER! Well, that's what I'm doing now. It was the path I did not want to go, but I have to! Only means I have to read into the browser source code and modify the C++ code and build it. Oh wait, I've already done that. The browser source is pretty tough to read... maybe there are some docs out there. I've been grepping and manually reading trying to find where things are and it's interesting how they've done some things. I need to figure out how to strip down the browser such as the applications and search ability and all that crap. Basically, creating a CEF not really. There should be some configuration options to disable that stuff, so I can cut the build time down (takes about an hour! on my tablet/laptop).

I will combine it with selenium and there we go. A browser that does everything that I want it to do with everything I need. :)
You just read "Google Chrome Adventures". Please share if you liked it!
You can read more recent posts here.