Add ninja as a submodule.

Change-Id: Id12c5810e83c47a1c7289515cabc5ddd9a8a280b
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Add Chromium as a submodule.

Change-Id: Iba5f11ecf2b45d33b91252d4394010458c783bce
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Add init-repository.py script.

Chromium is not using a regular git submodule based
repository layout. Therefore some special tweaking is
necessary.
This script will take care of setting the correct
submodule paths and references after cloning the
qtwebengine repository.
Further it also downloads and builds the ninja build tool.

Change-Id: I999ef33cbdbe3bfaff88253bb543ba77f5b68fd7
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Rename ninja Makefile target to invoke_ninja.

This avoids the Makefile target colliding with the submodule name.
If both have the same name, the target would not be invoked.
This is because make would find a file/folder ninja in the build
subdirectory, and therefore belives that the dependencies for
the target "ninja" are fulfilled.

Change-Id: I7ef1974e06d9cd7a6023d0d17170e0bf730c4b87
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Remove gclient commands from patch_chromium script.

The new submodule layout does not need gclient anymore.
Instead it relies on the init-repository.py script and git submodule.
We are still checking for CHROMIUM_SRC_DIR for the time being.
Just in case somebody still wants to use external chromium sources.
In this case it will be necessary to master gclient manually though.

Change-Id: I1633cda873c94fd86433be1f60fd422c7f230cb2
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Improve init-repository.py script.

The script now also installs a gerrit git remote
and the Change-Id git hook.
Further it also resets the chromium repository
and applies the patches on top.

Change-Id: Ic0cb0195678e457a9316454d75132798bc5b9de2
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Add ignore = all for chromium submodule.

This prevents chromium from showing up in git diff all the time after
applying patches.
It also prevents from accidentially updating the submodule sha sum.
A nice side effect is also that git diff is all of a sudden much
faster again. ;)

Change-Id: I6f48b8f90a2853b2e3716011c2c42bb661d09060
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Deduplicate RenderWidgetHostViewQt member in delegates

Move RWHV member to common base class RWHVDelegate instead of
declaring it in both the widget and quick implementations,
and do not leak it.

Change-Id: I72d692e10128a6b4cb5c2e3c3817d6dca078c2bc
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Replace include by forward declaration in the private headers

Also remove some unneeded includes.

Change-Id: I335bfb1d8c74b2e44d7bf576c3b76f6c32af35c3
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Tweak the build system

Fix a typo so we get the correct CHROMIUM_SRC_DIR and add it to
INCLUDEPATH so that QtCreator indexes Chromium headers.
Also add NINJAFLAGS environment variable to ninja command line
to be able to specify options to ninja, like how many jobs it
should run when using icecc.

Change-Id: Ib494dc5c71d4e3a4eac419118c9cf6b1c474b6da
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Implement WebContentsViewQt::GetContainerBounds

This is based on other ports' implementations and seems to be used
for sizing / positioning popup menus.

Change-Id: I96fa89529157a774571f252d751879b7e61119d0
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Add Mac support.

Adding several patches to the repository that need
to be applied to the chromium sources in order to allow
building on Mac.

Change-Id: Ie06250a828b3533e2f48563ce374e63fc25d16cf
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix init-repository.py for Mac.

On Mac we also want to clone submodules which
have an os tag 'mac'.

Change-Id: Ibed75378767e3489a7b496c77a563464e10ea0a8
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Add function stubs required to be reimplemented on Mac.

This commit only adds empty function stubs.
All of these should be reevaluated and the
QT_NOT_YET_IMPLEMENTED macro should be removed.

Change-Id: I181fd89628cf84a421f54bbc5c31a544e04cf944
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
CreateViewForWidget must return a value.

Change-Id: I4057758500b01ba3b55f7521c9b6384f94ed4255
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix the build without c++11

Use NULL instead of nullptr.

Change-Id: I3294cecdc13054011f036a7645d5f97d23f71e0b
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Avoild calls to RenderWidgetHostViewQt::GetNativeView()

Override RenderWidgetHostView::GetPhysicalBackingSize() since
the implementation in RenderWidgetHostViewBase calls GetNativeView
only to get the device scale factor of the screen. This way we
can avoid calls to GetNativeView for now.
Add a new macro QT_NOT_USED to mark evaluated and currently unused
and possibly unneded functions and mark gfx::NativeView related
functions in our render widget host view implementation as unused.

Change-Id: I32011334fe06618cb47ea649d2f6e4393310dc13
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Update include path for string_util.h.

Suggested by mbroadst.

Change-Id: I536da2bd57ad3467538f7e83070a9641f6ed5993
Reviewed-by: Matt Broadstone <mbroadst@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Fix potential null pointer dereference crash

Change-Id: I88588a34cb857cecd8dbe95ca87510443a4524fd
Reviewed-by: Matt Broadstone <mbroadst@gmail.com>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Disable tcmalloc on mac.

Change-Id: Ic261e5aa38b04632c019d577117e9fb205462d82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>