Skip to content

Commit

Permalink
Add display, message_center, shell_dialogs, webview to GN build.
Browse files Browse the repository at this point in the history
R=sky@chromium.org

Review URL: https://codereview.chromium.org/393953008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283516 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed Jul 16, 2014
1 parent 1cf53fa commit a1d7d4f
Show file tree
Hide file tree
Showing 19 changed files with 566 additions and 17 deletions.
4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ group("root") {
"//ui/aura",
"//ui/accessibility",
"//ui/base",
"//ui/display",
"//ui/events",
"//ui/gfx",
"//ui/gl",
Expand All @@ -106,6 +107,7 @@ group("root") {
"//ui/strings",
"//ui/surface",
"//ui/views",
"//ui/views/controls/webview",
"//ui/web_dialogs",
"//ui/wm",
"//url",
Expand Down Expand Up @@ -175,7 +177,9 @@ group("root") {
"//ash",
"//tools/gn",
"//ui/aura",
"//ui/display",
"//ui/views",
"//ui/views/controls/webview",

# Fails on Android for unknown reasons.
"//third_party/flac",
Expand Down
4 changes: 2 additions & 2 deletions build/config/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ use_seccomp_bpf = (is_linux || is_android) &&

enable_webrtc = !is_ios

# Enable notifications everywhere except Android.
# Enable notifications everywhere except Android/iOS.
# Android is http://crbug.com/115320
enable_notifications = !is_android
enable_notifications = !is_android && !is_ios

# TODO(brettw) this should be moved to net and only dependents get this define.
disable_ftp_support = is_ios
Expand Down
6 changes: 5 additions & 1 deletion build/config/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ config("xext") {
}

config("xrandr") {
libs = [ "xrandr" ]
libs = [ "Xrandr" ]
}

config("xscrnsaver") {
Expand All @@ -112,6 +112,10 @@ config("libcap") {
libs = [ "cap" ]
}

config("xi") {
libs = [ "Xi" ]
}

config("libresolv") {
libs = [ "resolv" ]
}
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ static_library("browser") {
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/message_center",
"//ui/shell_dialogs",
"//ui/strings",
"//ui/resources",
# TODO(GYP)
Expand All @@ -103,8 +105,6 @@ static_library("browser") {
#"../components/components.gyp:sync_driver",
#"../jingle/jingle.gyp:notifier",
#"../third_party/libjingle/libjingle.gyp:libjingle",
#"../ui/message_center/message_center.gyp:message_center",
#"../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs",
]

forward_dependent_configs_from = [
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static_library("ui") {
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/message_center",
"//ui/native_theme",
"//ui/resources",
"//ui/snapshot",
Expand All @@ -70,7 +71,6 @@ static_library("ui") {
#'../components/components.gyp:invalidation', TODO(GYP)
#'../components/components.gyp:omaha_query_params', TODO(GYP)
#'../components/components.gyp:password_manager_core_browser', TODO(GYP)
#'../ui/message_center/message_center.gyp:message_center', TODO(GYP)
]

forward_dependent_configs_from = [
Expand Down
2 changes: 1 addition & 1 deletion content/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ source_set("common") {
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/shell_dialogs",
"//url",
"//third_party/WebKit/public:blink_headers",
# TODO(GYP) convert these dependencies.
#'../third_party/libjingle/libjingle.gyp:libjingle',
#'../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
]

if (!is_ios) {
Expand Down
6 changes: 6 additions & 0 deletions ui/base/ui_base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
'targets': [
{
# GN version: //ui/base
'target_name': 'ui_base',
'type': '<(component)',
'dependencies': [
Expand Down Expand Up @@ -35,6 +36,7 @@
'../gfx/gfx.gyp:gfx',
],
'sources' : [
# Note: file list duplicated in GN build.
'accelerators/accelerator.cc',
'accelerators/accelerator.h',
'accelerators/accelerator_manager.cc',
Expand Down Expand Up @@ -580,6 +582,7 @@
],
},
{
# GN version: //ui/base:test_support
'target_name': 'ui_base_test_support',
'dependencies': [
'../../base/base.gyp:base',
Expand All @@ -589,6 +592,7 @@
'../gfx/gfx.gyp:gfx_geometry',
],
'sources': [
# Note: file list duplicated in GN build.
'test/ui_controls.h',
'test/ui_controls_aura.cc',
'test/ui_controls_internal_win.cc',
Expand Down Expand Up @@ -624,9 +628,11 @@
['OS=="android"' , {
'targets': [
{
# GN version: //ui/base:ui_base_jni_headers
'target_name': 'ui_base_jni_headers',
'type': 'none',
'sources': [
# Note: file list duplicated in GN build.
'../android/java/src/org/chromium/ui/base/Clipboard.java',
'../android/java/src/org/chromium/ui/base/DeviceFormFactor.java',
'../android/java/src/org/chromium/ui/base/LocalizationUtils.java',
Expand Down
106 changes: 106 additions & 0 deletions ui/display/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")

component("display") {
sources = [
"chromeos/display_configurator.cc",
"chromeos/display_configurator.h",
"chromeos/touchscreen_delegate_impl.cc",
"chromeos/touchscreen_delegate_impl.h",
"chromeos/ozone/display_configurator_ozone.cc",
"chromeos/x11/display_configurator_x11.cc",
"chromeos/x11/display_mode_x11.cc",
"chromeos/x11/display_mode_x11.h",
"chromeos/x11/display_snapshot_x11.cc",
"chromeos/x11/display_snapshot_x11.h",
"chromeos/x11/display_util_x11.cc",
"chromeos/x11/display_util_x11.h",
"chromeos/x11/native_display_delegate_x11.cc",
"chromeos/x11/native_display_delegate_x11.h",
"chromeos/x11/native_display_event_dispatcher_x11.cc",
"chromeos/x11/native_display_event_dispatcher_x11.h",
"chromeos/x11/touchscreen_device_manager_x11.cc",
"chromeos/x11/touchscreen_device_manager_x11.h",
"display_export.h",
"display_switches.cc",
"display_switches.h",
]

defines = [ "DISPLAY_IMPLEMENTATION" ]

deps = [
"//base",
"//ui/display/util",
"//ui/gfx",
"//ui/gfx/geometry",
]

if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xext",
"//build/config/linux:xi",
"//build/config/linux:xrandr",
]
deps += [
"//ui/events/platform",
]
}

if (is_chromeos) {
deps += [ "//ui/display/types" ]
}

if (use_ozone) {
deps += [ "//ui/ozone" ]
}
}

component("test_util") {
output_name = "display_test_util"
sources = [
"chromeos/test/test_display_snapshot.cc",
"chromeos/test/test_display_snapshot.h",
]

defines = [ "DISPLAY_IMPLEMENTATION" ]

deps = [
"//base",
"//ui/gfx",
"//ui/gfx/geometry",
]

if (is_chromeos) {
deps += [ "//ui/display/types" ]
}
}

test("display_unittests") {
sources = [
"chromeos/display_configurator_unittest.cc",
"chromeos/touchscreen_delegate_impl_unittest.cc",
"chromeos/x11/display_util_x11_unittest.cc",
"chromeos/x11/native_display_event_dispatcher_x11_unittest.cc",
"util/display_util_unittest.cc",
"util/edid_parser_unittest.cc",
]

deps = [
"//base/test:run_all_unittests",
"//testing/gtest",
"//ui/display/util",
"//ui/gfx/geometry",
]

if (is_chromeos) {
deps += [
":display",
":test_util",
"//ui/display/types",
]
}
}
9 changes: 9 additions & 0 deletions ui/display/display.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
'targets': [
{
# GN version: //ui/display/types
'target_name': 'display_types',
'type': '<(component)',
'dependencies': [
Expand All @@ -18,6 +19,7 @@
'DISPLAY_TYPES_IMPLEMENTATION',
],
'sources': [
# Note: file list duplicated in GN build.
'types/chromeos/display_mode.cc',
'types/chromeos/display_mode.h',
'types/chromeos/display_snapshot.cc',
Expand All @@ -32,6 +34,7 @@
],
},
{
# GN version: //ui/display
'target_name': 'display',
'type': '<(component)',
'dependencies': [
Expand All @@ -44,6 +47,7 @@
'DISPLAY_IMPLEMENTATION',
],
'sources': [
# Note: file list duplicated in GN build.
'chromeos/display_configurator.cc',
'chromeos/display_configurator.h',
'chromeos/touchscreen_delegate_impl.cc',
Expand Down Expand Up @@ -89,6 +93,7 @@
],
},
{
# GN version: //ui/display/util
'target_name': 'display_util',
'type': '<(component)',
'dependencies': [
Expand All @@ -99,6 +104,7 @@
'DISPLAY_UTIL_IMPLEMENTATION',
],
'sources': [
# Note: file list shared with GN build.
'util/display_util.cc',
'util/display_util.h',
'util/display_util_export.h',
Expand All @@ -122,6 +128,7 @@
],
},
{
# GN version: //ui/display:test_util
'target_name': 'display_test_util',
'type': '<(component)',
'dependencies': [
Expand All @@ -133,6 +140,7 @@
'DISPLAY_IMPLEMENTATION',
],
'sources': [
# Note: file list duplicated in GN build.
'chromeos/test/test_display_snapshot.cc',
'chromeos/test/test_display_snapshot.h',
],
Expand All @@ -145,6 +153,7 @@
],
},
{
# GN version: //ui/display:display_unittests
'target_name': 'display_unittests',
'type': 'executable',
'dependencies': [
Expand Down
27 changes: 27 additions & 0 deletions ui/display/types/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

component("types") {
output_name = "display_types"
sources = [
"chromeos/display_mode.cc",
"chromeos/display_mode.h",
"chromeos/display_snapshot.cc",
"chromeos/display_snapshot.h",
"chromeos/native_display_delegate.h",
"chromeos/native_display_observer.h",
"chromeos/touchscreen_device.cc",
"chromeos/touchscreen_device.h",
"chromeos/touchscreen_device_manager.h",
"display_constants.h",
"display_types_export.h",
]

defines = [ "DISPLAY_TYPES_IMPLEMENTATION" ]

deps = [
"//base",
"//ui/gfx/geometry",
]
}
35 changes: 35 additions & 0 deletions ui/display/util/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")

component("util") {
output_name = "display_util"
sources = [
"display_util.cc",
"display_util.h",
"display_util_export.h",
"edid_parser.cc",
"edid_parser.h",
]

defines = [ "DISPLAY_UTIL_IMPLEMENTATION" ]

deps = [
"//base",
"//ui/gfx/geometry",
]

if (use_x11) {
sources += [
"x11/edid_parser_x11.cc",
"x11/edid_parser_x11.h",
]
configs += [ "//build/config/linux:xrandr" ]
deps += [ "//ui/gfx/x" ]
}
if (is_chromeos) {
deps += [ "//ui/display/types" ]
}
}
Loading

0 comments on commit a1d7d4f

Please sign in to comment.