1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_MESSAGE_CENTER_COCOA_SETTINGS_ENTRY_VIEW_H_
6 #define UI_MESSAGE_CENTER_COCOA_SETTINGS_ENTRY_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #import "base/mac/scoped_nsobject.h"
11 #import "ui/base/cocoa/hover_image_button.h"
12 #include "ui/message_center/notifier_settings.h"
14 @
class MCSettingsController
;
16 // The view that renders individual notifiers in the settings sheet. This
17 // includes an enable/disable checkbox, icon, name, and learn more button,
18 // and an optional horizontal separator line.
19 @interface MCSettingsEntryView
: NSBox
{
22 MCSettingsController
* controller_
;
24 // Weak, owned by MCSettingsController.
25 message_center::Notifier
* notifier_
;
27 // The image that will be displayed next to the notifier name, loaded
29 base::scoped_nsobject
<NSImage
> notifierIcon_
;
31 // The button that can be displayed after the notifier name, that when
32 // clicked on causes an event to be fired for more information.
33 base::scoped_nsobject
<HoverImageButton
> learnMoreButton_
;
35 // The button that contains the label, notifier icon and checkbox.
36 base::scoped_nsobject
<NSButton
> checkbox_
;
38 // The border on the bottom of the view.
40 base::scoped_nsobject
<NSBox
> separator_
;
43 - (id
)initWithController
:(MCSettingsController
*)controller
44 notifier
:(message_center::Notifier
*)notifier
46 hasSeparator
:(BOOL
)hasSeparator
;
48 - (void)setNotifierIcon
:(NSImage
*)notifierIcon
;
50 - (NSButton
*)checkbox
;
54 @interface
MCSettingsEntryView (TestingAPI
)
55 - (void)clickLearnMore
;
58 #endif // UI_MESSAGE_CENTER_COCOA_SETTINGS_ENTRY_VIEW_H_