| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ |
| 7 | 7 |
| 8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_block.h" | 10 #include "base/mac/scoped_block.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 @private | 28 @private |
| 29 // The status item. | 29 // The status item. |
| 30 base::scoped_nsobject<NSStatusItem> statusItem_; | 30 base::scoped_nsobject<NSStatusItem> statusItem_; |
| 31 | 31 |
| 32 // Callback issued when the status item is clicked. | 32 // Callback issued when the status item is clicked. |
| 33 base::mac::ScopedBlock<message_center::StatusItemClickedCallack> callback_; | 33 base::mac::ScopedBlock<message_center::StatusItemClickedCallack> callback_; |
| 34 | 34 |
| 35 // The unread count number to be drawn next to the icon. | 35 // The unread count number to be drawn next to the icon. |
| 36 size_t unreadCount_; | 36 size_t unreadCount_; |
| 37 | 37 |
| 38 // Whether or not we are to display the quiet mode version of the status icon. |
| 39 BOOL quietMode_; |
| 40 |
| 38 // Whether or not to force the highlight pattern to be drawn. | 41 // Whether or not to force the highlight pattern to be drawn. |
| 39 BOOL highlight_; | 42 BOOL highlight_; |
| 40 | 43 |
| 41 // Whether or not the view is currently handling mouse events and should | 44 // Whether or not the view is currently handling mouse events and should |
| 42 // draw the highlight pattern. | 45 // draw the highlight pattern. |
| 43 BOOL inMouseEventSequence_; | 46 BOOL inMouseEventSequence_; |
| 44 } | 47 } |
| 45 | 48 |
| 46 @property(copy, nonatomic) message_center::StatusItemClickedCallack callback; | 49 @property(copy, nonatomic) message_center::StatusItemClickedCallack callback; |
| 47 @property(nonatomic) size_t unreadCount; | |
| 48 @property(nonatomic) BOOL highlight; | 50 @property(nonatomic) BOOL highlight; |
| 49 | 51 |
| 50 // Designated initializer. Creates a new NSStatusItem in the system menubar. | 52 // Designated initializer. Creates a new NSStatusItem in the system menubar. |
| 51 - (id)init; | 53 - (id)init; |
| 52 | 54 |
| 55 // Sets the unread count and quiet mode status of the icon. |
| 56 - (void)setUnreadCount:(size_t)unreadCount withQuietMode:(BOOL)quietMode; |
| 57 |
| 53 // Removes the status item from the menubar. Must be called to break the | 58 // Removes the status item from the menubar. Must be called to break the |
| 54 // retain cycle between self and the NSStatusItem view. | 59 // retain cycle between self and the NSStatusItem view. |
| 55 - (void)removeItem; | 60 - (void)removeItem; |
| 56 | 61 |
| 57 @end | 62 @end |
| 58 | 63 |
| 59 #endif // UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ | 64 #endif // UI_MESSAGE_CENTER_COCOA_STATUS_ITEM_VIEW_H_ |
| OLD | NEW |