Chromium Code Reviews| Index: chrome/browser/ui/cocoa/notifications/BUILD.gn |
| diff --git a/chrome/browser/ui/cocoa/notifications/BUILD.gn b/chrome/browser/ui/cocoa/notifications/BUILD.gn |
| index 985e8f8ee5fad1a64ba798ff66e275d92737b53a..1b9e1ceae3881ed132bc20129e983cf72ea14d27 100644 |
| --- a/chrome/browser/ui/cocoa/notifications/BUILD.gn |
| +++ b/chrome/browser/ui/cocoa/notifications/BUILD.gn |
| @@ -2,6 +2,46 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import("//build/util/branding.gni") |
| +import("//build/config/mac/rules.gni") |
| + |
| +mac_app_bundle("alert_notification_xpc_service") { |
| + output_name = "AlertNotificationService" |
| + package_type = "xpc" |
| + |
| + info_plist = "xpc-Info.plist" |
| + extra_substitutions = |
| + [ "PRODUCT_BUNDLE_IDENTIFIER=$chrome_mac_bundle_id.$output_name" ] |
|
Robert Sesek
2016/09/29 14:23:04
The convention for setting the bundle ID is to dec
Miguel Garcia
2016/10/03 16:07:50
Ok, let's see if I got this right, in the .plist I
Robert Sesek
2016/10/04 16:04:25
Yes, that works. ${output_name} won't work but ${E
|
| + |
| + sources = [ |
| + "alert_notification_service.h", |
| + "alert_notification_service.mm", |
| + "notification_service_delegate.h", |
| + "notification_service_delegate.mm", |
| + "xpc_service_main.mm", |
| + ] |
| + |
| + deps = [ |
| + ":common", |
| + ] |
| + |
| + libs = [ |
| + "AppKit.framework", |
|
Robert Sesek
2016/09/29 14:23:04
Do you need AppKit?
Miguel Garcia
2016/10/03 16:07:50
Yes (for NSImage).
|
| + "Foundation.framework", |
| + ] |
| + |
| + ldflags = [] |
| + if (is_component_build) { |
| + ldflags += [ |
| + # The XPC service is in Chromium.app/Contents/Versions/X/Chromium \ |
| + # Framework.framework/XPCServices/AlertNotificationService.xpc/\ |
| + # Contents/MacOS/ so set rpath up to the base. |
| + "-rpath", |
| + "@loader_path/../../../../../../../../../", |
| + ] |
| + } |
| +} |
| + |
| static_library("common") { |
| sources = [ |
| "notification_builder_mac.h", |
| @@ -13,7 +53,7 @@ static_library("common") { |
| "notification_response_builder_mac.mm", |
| ] |
| - deps = [ |
| - "//base", |
| + public_deps = [ |
|
Robert Sesek
2016/09/29 14:23:04
Leave this as deps and add an explicit deps on bas
Miguel Garcia
2016/10/03 16:07:50
Done.
|
| + "//base:base", |
| ] |
| } |