diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 19:04:40 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 19:04:40 +0000 |
commit | 1218f337b58d7f56e15ae816bb7901dc32e4f160 (patch) | |
tree | 4f9dfff301464b4d86d340cbfa8753ac80026ad8 /base | |
parent | fbcbe4960c71806485008ea7de1f3ba04bc44794 (diff) | |
download | chromium_src-1218f337b58d7f56e15ae816bb7901dc32e4f160.zip chromium_src-1218f337b58d7f56e15ae816bb7901dc32e4f160.tar.gz chromium_src-1218f337b58d7f56e15ae816bb7901dc32e4f160.tar.bz2 |
[Mac] Implement a NotificationUIManager that uses Notification Center on 10.8 for text notifications.
BUG=120677
TEST=On 10.8, enable Gmail desktop notifications and chat with somebody. You see notifications and clicking them closes them, brings Chromium to the foreground, and removes them from the tray.
TEST=On 10.8, try using a HTML-based notification and it gets displayed in the old style.
Review URL: http://codereview.chromium.org/10021026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/mac/cocoa_protocols.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/base/mac/cocoa_protocols.h b/base/mac/cocoa_protocols.h index 88b07b4..d6cb614 100644 --- a/base/mac/cocoa_protocols.h +++ b/base/mac/cocoa_protocols.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,13 +19,13 @@ // define these protocols at all, this file will provide empty protocol // definitions when used with earlier SDK versions. -#if !defined(MAC_OS_X_VERSION_10_6) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 - #define DEFINE_EMPTY_PROTOCOL(p) \ @protocol p \ @end +#if !defined(MAC_OS_X_VERSION_10_6) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 + DEFINE_EMPTY_PROTOCOL(NSAlertDelegate) DEFINE_EMPTY_PROTOCOL(NSApplicationDelegate) DEFINE_EMPTY_PROTOCOL(NSControlTextEditingDelegate) @@ -42,8 +42,15 @@ DEFINE_EMPTY_PROTOCOL(NSTextFieldDelegate) DEFINE_EMPTY_PROTOCOL(NSTextViewDelegate) DEFINE_EMPTY_PROTOCOL(NSWindowDelegate) -#undef DEFINE_EMPTY_PROTOCOL +#endif // MAC_OS_X_VERSION_10_6 + +#if !defined(MAC_OS_X_VERSION_10_8) || \ + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 + +DEFINE_EMPTY_PROTOCOL(NSUserNotificationCenterDelegate) -#endif +#endif // MAC_OS_X_VERSION_10_6 + +#undef DEFINE_EMPTY_PROTOCOL #endif // BASE_COCOA_PROTOCOLS_MAC_H_ |