diff options
author | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 18:22:30 +0000 |
---|---|---|
committer | saintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-30 18:22:30 +0000 |
commit | 1b54669c437b802b6e57cd4194a35cf8e5b8c418 (patch) | |
tree | de41f3e31a24adfbc107a2d796960065f6113004 /build/common.gypi | |
parent | b32bd6ee3e8d24350b740e4be79fa8c45885d346 (diff) | |
download | chromium_src-1b54669c437b802b6e57cd4194a35cf8e5b8c418.zip chromium_src-1b54669c437b802b6e57cd4194a35cf8e5b8c418.tar.gz chromium_src-1b54669c437b802b6e57cd4194a35cf8e5b8c418.tar.bz2 |
As per oshima:
The ultimate goal is to eliminate TOOLKIT_USES_GTK. Once that migration is completed, TOOLKIT_VIEWS + OS_LINUX should be enough.
Until this happens, we need a binary that:
1) has both gtk and pure-views
2) can enable pure views components with --use-pure-views when possible (this is default in touchui=1).
If we could switch everything with --use-pure-views, that'd be nice, but the world is not perfect and there are things that cannot co-exist (such as message pump). For such component, we'll use GYP_DEFINES to switch.
1) TOOLKIT_USES_PURE_VIEWS is defined with toolkit_pure_views=1.
2) all (or most of) chrome features must be functional with toolkit_pure_views=1
3) both TOOLKIT_USES_GTK and TOOLKIT_USES_PURE_VIEWS are defined. The latter has higher priority (that is, if implementation can't co-exists, TOOLKIT_USE_PURE_VIEWS will take precedence).
4) As the migration proceeds, there will be less TOOLKIT_USES_GTK and more TOOLKIT_USES_PURE_VIEWS.
5) Once the migration is complete (that is, there is no TOOKIT_USES_GTK), we can remove TOOLKIT_USES_PURE_VIEWS or replace it with OS_LINUX when necessary.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7273079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi index 75f1e5f..51d2ebe 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -21,6 +21,17 @@ # Whether we're building a ChromeOS build. 'chromeos%': 0, + # Whether the Views toolkit can use its Pure form when available + # or if it must only use GTK (the default at the moment). + # This is an intermediate step until all of Views is 'Pure', + # at which point we plan to remove those switches. + # This turns on the TOOLKIT_USES_PURE_VIEWS macro which is used + # to replace the corresponding GTK implementation in such a way + # that GTK and PureViews can coexist. This intermediate solution + # allow us to switch the view implementations using + # --use-pure-views, without breaking exiting gtk implementation. + 'toolkit_uses_pure_views%': 0, + # Disable touch support by default. 'touchui%': 0, @@ -29,6 +40,7 @@ }, # Copy conditionally-set variables out one scope. 'chromeos%': '<(chromeos)', + 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', 'touchui%': '<(touchui)', 'views_compositor%': '<(views_compositor)', @@ -46,11 +58,18 @@ # Set default value of toolkit_views on for Windows, Chrome OS # and the touch UI. - ['OS=="win" or chromeos==1 or touchui==1', { + ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', { 'toolkit_views%': 1, }, { 'toolkit_views%': 0, }], + + # Views are always Pure in Touch case + ['touchui==1', { + 'toolkit_uses_pure_views%': 1, + }, { + 'toolkit_uses_pure_views%': 0, + }], ], }, @@ -59,6 +78,7 @@ 'touchui%': '<(touchui)', 'host_arch%': '<(host_arch)', 'toolkit_views%': '<(toolkit_views)', + 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', 'views_compositor%': '<(views_compositor)', # We used to provide a variable for changing how libraries were built. @@ -220,6 +240,7 @@ 'host_arch%': '<(host_arch)', 'library%': 'static_library', 'toolkit_views%': '<(toolkit_views)', + 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', 'views_compositor%': '<(views_compositor)', 'os_posix%': '<(os_posix)', 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', @@ -569,6 +590,9 @@ ['toolkit_views==1', { 'grit_defines': ['-D', 'toolkit_views'], }], + ['toolkit_uses_pure_views==1', { + 'grit_defines': ['-D', 'toolkit_uses_pure_views'], + }], ['touchui==1', { 'grit_defines': ['-D', 'touchui'], }], @@ -662,6 +686,9 @@ ['toolkit_views==1', { 'defines': ['TOOLKIT_VIEWS=1'], }], + ['toolkit_uses_pure_views==1', { + 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'], + }], ['views_compositor==1', { 'defines': ['VIEWS_COMPOSITOR=1'], }], |