1# Copyright 2019 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
5import("//mojo/public/tools/bindings/mojom.gni")
6
7config("app_shim_warnings") {
8  if (is_mac) {
9    # TODO(thakis): Remove this once http://crbug.com/383820 is figured out
10    cflags = [ "-Wno-nonnull" ]
11  }
12}
13
14# This component is for code that is to run in the app shim process.
15component("app_shim") {
16  assert(is_mac)
17
18  configs += [ ":app_shim_warnings" ]
19  sources = [
20    "alert.h",
21    "alert.mm",
22    "application_bridge.h",
23    "application_bridge.mm",
24    "bridged_content_view.h",
25    "bridged_content_view.mm",
26    "bridged_content_view_touch_bar.mm",
27    "browser_native_widget_window_mac.h",
28    "browser_native_widget_window_mac.mm",
29    "certificate_viewer.h",
30    "certificate_viewer.mm",
31    "color_panel_bridge.h",
32    "color_panel_bridge.mm",
33    "drag_drop_client.h",
34    "mouse_capture.h",
35    "mouse_capture.mm",
36    "mouse_capture_delegate.h",
37    "native_widget_mac_frameless_nswindow.h",
38    "native_widget_mac_frameless_nswindow.mm",
39    "native_widget_mac_nswindow.h",
40    "native_widget_mac_nswindow.mm",
41    "native_widget_ns_window_bridge.h",
42    "native_widget_ns_window_bridge.mm",
43    "native_widget_ns_window_host_helper.h",
44    "ns_view_ids.h",
45    "ns_view_ids.mm",
46    "remote_cocoa_app_shim_export.h",
47    "select_file_dialog_bridge.h",
48    "select_file_dialog_bridge.mm",
49    "views_nswindow_delegate.h",
50    "views_nswindow_delegate.mm",
51    "views_scrollbar_bridge.h",
52    "views_scrollbar_bridge.mm",
53    "window_move_loop.h",
54    "window_move_loop.mm",
55    "window_touch_bar_delegate.h",
56  ]
57  defines = [ "REMOTE_COCOA_APP_SHIM_IMPLEMENTATION" ]
58  deps = [
59    "//base",
60    "//base:i18n",
61    "//components/crash/core/common",
62    "//components/remote_cocoa/common:mojo",
63    "//mojo/public/cpp/bindings",
64    "//net",
65    "//ui/accelerated_widget_mac",
66    "//ui/base",
67    "//ui/base/ime:ime",
68    "//ui/events",
69    "//ui/gfx",
70    "//ui/strings:ui_strings_grit",
71  ]
72  frameworks = [
73    "Cocoa.framework",
74    "QuartzCore.framework",
75    "SecurityInterface.framework",
76  ]
77}
78