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: http://src.chromium.org/svn/trunk/src/build@91164 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
saintlou@chromium.org 2011-06-30 18:22:30 +00:00
Родитель 7010b27882
Коммит bd531cf5d3
1 изменённых файлов: 28 добавлений и 1 удалений

Просмотреть файл

@ -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'],
}],