blob: de9893a580eebcc474495c53b01a6e6490678646 [file] [log] [blame]
oshima136691a2014-10-24 21:54:111# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
patricialor7a65925402016-08-18 03:57:125import("//build/config/ui.gni")
taptedc6045232016-11-30 10:42:076import("//ui/base/ui_features.gni")
patricialor7a65925402016-08-18 03:57:127
brettw8deee3902016-07-22 03:55:528static_library("constrained_window") {
oshima136691a2014-10-24 21:54:119 sources = [
10 "constrained_window_views.cc",
11 "constrained_window_views.h",
tfarinaeac24da2015-07-22 20:41:3312 "constrained_window_views_client.h",
patricialor7a65925402016-08-18 03:57:1213 "native_web_contents_modal_dialog_manager_views.cc",
14 "native_web_contents_modal_dialog_manager_views.h",
thakisb8590c92017-03-23 18:14:5315 "native_web_contents_modal_dialog_manager_views_mac.h",
patricialor8f36f7b2016-08-29 03:59:2916 "native_web_contents_modal_dialog_manager_views_mac.mm",
oshima136691a2014-10-24 21:54:1117 ]
18
Leonard Grey989dbd82018-03-07 18:10:2419 if (is_mac) {
patricialor7a65925402016-08-18 03:57:1220 sources += [ "show_modal_dialog_cocoa.cc" ]
Leonard Grey989dbd82018-03-07 18:10:2421 if (mac_views_browser) {
22 sources += [ "show_modal_dialog_views.cc" ]
23 }
patricialor7a65925402016-08-18 03:57:1224 } else {
25 sources += [ "show_modal_dialog_views.cc" ]
26 }
27
oshima136691a2014-10-24 21:54:1128 deps = [
fsamuelaf5bf6d12015-05-28 16:29:5429 "//components/guest_view/browser",
oshima136691a2014-10-24 21:54:1130 "//components/web_modal",
patricialor7a65925402016-08-18 03:57:1231 "//content/public/browser",
kylixrd51116b92016-12-16 16:48:1032 "//ui/display",
agrieved7a71c882015-11-20 19:53:2833 "//ui/views",
oshima136691a2014-10-24 21:54:1134 ]
patricialor7a65925402016-08-18 03:57:1235 public_deps = [
36 # Skia headers are exposed in the public API.
37 "//skia",
38 ]
39
40 if (use_aura) {
41 deps += [
42 "//ui/aura",
oshima4d3123152017-07-07 20:36:5343 "//ui/compositor",
patricialor7a65925402016-08-18 03:57:1244 "//ui/wm",
45 ]
46 }
oshima136691a2014-10-24 21:54:1147}
48
49source_set("unit_tests") {
50 testonly = true
51 sources = [
52 "constrained_window_views_unittest.cc",
53 ]
54
Elly Fong-Jones6d47d3b2018-03-19 18:54:0855 if (is_mac) {
patricialor7a65925402016-08-18 03:57:1256 sources += [ "test_create_native_web_modal_manager_cocoa.cc" ]
57 }
58
oshima136691a2014-10-24 21:54:1159 deps = [
60 ":constrained_window",
brettw0741cb1c2015-08-21 22:06:0061 "//components/web_modal:test_support",
oshima136691a2014-10-24 21:54:1162 "//ui/views:test_support",
63 ]
64}