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    "color_panel_bridge.h",
30    "color_panel_bridge.mm",
31    "drag_drop_client.h",
32    "mouse_capture.h",
33    "mouse_capture.mm",
34    "mouse_capture_delegate.h",
35    "native_widget_mac_frameless_nswindow.h",
36    "native_widget_mac_frameless_nswindow.mm",
37    "native_widget_mac_nswindow.h",
38    "native_widget_mac_nswindow.mm",
39    "native_widget_ns_window_bridge.h",
40    "native_widget_ns_window_bridge.mm",
41    "native_widget_ns_window_host_helper.h",
42    "ns_view_ids.h",
43    "ns_view_ids.mm",
44    "remote_cocoa_app_shim_export.h",
45    "select_file_dialog_bridge.h",
46    "select_file_dialog_bridge.mm",
47    "views_nswindow_delegate.h",
48    "views_nswindow_delegate.mm",
49    "views_scrollbar_bridge.h",
50    "views_scrollbar_bridge.mm",
51    "window_move_loop.h",
52    "window_move_loop.mm",
53    "window_touch_bar_delegate.h",
54  ]
55  defines = [ "REMOTE_COCOA_APP_SHIM_IMPLEMENTATION" ]
56  deps = [
57    "//base",
58    "//base:i18n",
59    "//components/crash/core/common",
60    "//components/remote_cocoa/common:mojo",
61    "//mojo/public/cpp/bindings",
62    "//ui/accelerated_widget_mac",
63    "//ui/base",
64    "//ui/base/ime:ime",
65    "//ui/events",
66    "//ui/gfx",
67    "//ui/strings:ui_strings_grit",
68  ]
69  libs = [
70    "Cocoa.framework",
71    "QuartzCore.framework",
72  ]
73}
74