Index: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm |
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm |
index ef503f002245ebf0682c24d027402f3e92851b1e..1e3b160448a81dfad5b8e02e743d1b489c779848 100644 |
--- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm |
+++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm |
@@ -26,6 +26,9 @@ |
#include "components/signin/core/common/profile_management_switches.h" |
#include "ui/base/cocoa/cocoa_base_utils.h" |
+#import "base/mac/bundle_locations.h" |
+#import "chrome/browser/ui/cocoa/notifications/notification_delivery.h" |
+ |
// Space between the avatar icon and the avatar menu bubble. |
const CGFloat kMenuYOffsetAdjust = 1.0; |
// Offset needed to align the edge of the avatar bubble with the edge of the |
@@ -218,6 +221,30 @@ class ProfileAttributesUpdateObserver |
} |
- (IBAction)buttonClicked:(id)sender { |
+ { |
+ NSLog(@"attempting to start NSXPCS"); |
+ NSXPCConnection* conn = [[NSXPCConnection alloc] |
+ initWithServiceName: |
+ [NSString |
+ stringWithFormat:@"%@.BannerNotificationService", |
+ [base::mac::OuterBundle() bundleIdentifier]]]; |
+ conn.remoteObjectInterface = |
+ [NSXPCInterface interfaceWithProtocol:@protocol(NotificationDelivery)]; |
+ conn.interruptionHandler = ^{ |
+ NSLog(@"conn interruptionHandler: %@", conn); |
+ }; |
+ conn.invalidationHandler = ^{ |
+ NSLog(@"conn invalidationHandler %@", conn); |
+ }; |
+ [conn resume]; |
+ |
+ NSDictionary* dict = @{ @"title" : @"hello world" }; |
+ [[conn remoteObjectProxy] deliverNotification:dict]; |
+ |
+ //[conn invalidate]; |
+ //[conn release]; |
+ } |
+ |
BrowserWindow::AvatarBubbleMode mode = |
BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT; |
if ([self isCtrlPressed]) |