oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 1 | # 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 | |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 5 | import("//build/config/ui.gni") |
tapted | c604523 | 2016-11-30 10:42:07 | [diff] [blame] | 6 | import("//ui/base/ui_features.gni") |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 7 | |
brettw | 8deee390 | 2016-07-22 03:55:52 | [diff] [blame] | 8 | static_library("constrained_window") { |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 9 | sources = [ |
| 10 | "constrained_window_views.cc", |
| 11 | "constrained_window_views.h", |
tfarina | eac24da | 2015-07-22 20:41:33 | [diff] [blame] | 12 | "constrained_window_views_client.h", |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 13 | "native_web_contents_modal_dialog_manager_views.cc", |
| 14 | "native_web_contents_modal_dialog_manager_views.h", |
thakis | b8590c9 | 2017-03-23 18:14:53 | [diff] [blame] | 15 | "native_web_contents_modal_dialog_manager_views_mac.h", |
patricialor | 8f36f7b | 2016-08-29 03:59:29 | [diff] [blame] | 16 | "native_web_contents_modal_dialog_manager_views_mac.mm", |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 17 | ] |
| 18 | |
Leonard Grey | 989dbd8 | 2018-03-07 18:10:24 | [diff] [blame] | 19 | if (is_mac) { |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 20 | sources += [ "show_modal_dialog_cocoa.cc" ] |
Leonard Grey | 989dbd8 | 2018-03-07 18:10:24 | [diff] [blame] | 21 | if (mac_views_browser) { |
| 22 | sources += [ "show_modal_dialog_views.cc" ] |
| 23 | } |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 24 | } else { |
| 25 | sources += [ "show_modal_dialog_views.cc" ] |
| 26 | } |
| 27 | |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 28 | deps = [ |
fsamuel | af5bf6d1 | 2015-05-28 16:29:54 | [diff] [blame] | 29 | "//components/guest_view/browser", |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 30 | "//components/web_modal", |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 31 | "//content/public/browser", |
kylixrd | 51116b9 | 2016-12-16 16:48:10 | [diff] [blame] | 32 | "//ui/display", |
agrieve | d7a71c88 | 2015-11-20 19:53:28 | [diff] [blame] | 33 | "//ui/views", |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 34 | ] |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 35 | public_deps = [ |
| 36 | # Skia headers are exposed in the public API. |
| 37 | "//skia", |
| 38 | ] |
| 39 | |
| 40 | if (use_aura) { |
| 41 | deps += [ |
| 42 | "//ui/aura", |
oshima | 4d312315 | 2017-07-07 20:36:53 | [diff] [blame] | 43 | "//ui/compositor", |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 44 | "//ui/wm", |
| 45 | ] |
| 46 | } |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | source_set("unit_tests") { |
| 50 | testonly = true |
| 51 | sources = [ |
| 52 | "constrained_window_views_unittest.cc", |
| 53 | ] |
| 54 | |
Elly Fong-Jones | 6d47d3b | 2018-03-19 18:54:08 | [diff] [blame] | 55 | if (is_mac) { |
patricialor | 7a6592540 | 2016-08-18 03:57:12 | [diff] [blame] | 56 | sources += [ "test_create_native_web_modal_manager_cocoa.cc" ] |
| 57 | } |
| 58 | |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 59 | deps = [ |
| 60 | ":constrained_window", |
brettw | 0741cb1c | 2015-08-21 22:06:00 | [diff] [blame] | 61 | "//components/web_modal:test_support", |
oshima | 136691a | 2014-10-24 21:54:11 | [diff] [blame] | 62 | "//ui/views:test_support", |
| 63 | ] |
| 64 | } |