MacViews: Initial chrome_browser_ui.gypi support for views on mac
Allows target `chrome` to compile on Mac with toolkit-views. (It also
runs!)
This CL effectively renames the `chrome_browser_ui_views_sources`
sources list to `chrome_browser_ui_views_non_mac_sources`.
chrome_browser_ui_views_sources is now just the subset of files which
are ready for toolkit views on mac.
A use_aura condition becomes toolkit_views to control the filtering of
browser/ui/views/. This also enables other, ready views files for
compilation on a mac toolkit-views build: That is, those not currently
listed in chrome_browser_ui_views_sources, but with a browser/ui/views
prefix (e.g. browser/ui/views/app_list/). This would also include
task_manager_view.cc, which isn't ready, so it's dealt with separately.
For sizes, the linker is still able to do a good job pruning. A local
official/release build for `Google Chrome Framework` suggests this will
regress sizes just a small amount. Additionally enabling the views task
manager (patchset 8) ensures a sufficiently interesting portion of
views.a is linked as well, which regresses sizes more. Results:
Before: framework 78368kB, resources 45040kB
After: framework 78480kB, resources 45232kB (0.14%, 0.42%)
Later (with views+cocoa taskmanagers): 78796kB, resources 45244kB
(0.54%, 0.45% vs "before")
Note those numbers are just a preview since this CL doesn't have a
corresponding change in common.gypi to set toolkit-views=1 by default on
Mac.
BUG=390755
Review URL: https://codereview.chromium.org/375843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286355 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 150f2542..d2c1473 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -526,7 +526,7 @@
# Non-Windows.
sources += rebase_path(gypi_values.chrome_browser_non_win_sources,
".", "//chrome")
- if (use_aura) {
+ if (toolkit_views) {
deps += [
#"../ui/views/controls/webview/webview.gyp:webview", TODO(GYP)
#"../ui/views/views.gyp:views", TODO(GYP)