Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: chrome/browser/ui/cocoa/notifications/BUILD.gn

Issue 2070903002: Add an XPC service to handle alert notifications on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_builder_add_response
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..be1d42dfd369ec6981f7395efda3cbee9dcfce52 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 = [ "CHROME_BUNDLE_ID=$chrome_mac_bundle_id" ]
+
+ sources = [
+ "alert_notification_service.h",
+ "alert_notification_service.mm",
+ "notification_service_delegate.h",
+ "notification_service_delegate.mm",
+ "xpc_service_main.mm",
+ ]
+
+ deps = [
+ ":common",
+ "//base:base",
+ ]
+
+ libs = [
+ "AppKit.framework",
+ "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",
@@ -14,6 +54,6 @@ static_library("common") {
]
deps = [
- "//base",
+ "//base:base",
]
}

Powered by Google App Engine
This is Rietveld 408576698