Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / message_center / cocoa / tray_controller.h
blobbb790db6a8f0010c14fe9eea7e0393d003680452
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
3 // found in the LICENSE file.
5 #ifndef UI_MESSAGE_CENTER_COCOA_TRAY_CONTROLLER_H_
6 #define UI_MESSAGE_CENTER_COCOA_TRAY_CONTROLLER_H_
8 #import <AppKit/AppKit.h>
10 #include "base/basictypes.h"
11 #include "base/mac/scoped_nsobject.h"
12 #include "ui/message_center/message_center_export.h"
14 @class MCTrayViewController;
16 namespace message_center {
17 class MessageCenterTray;
20 // The window controller for the message center tray. This merely hosts the
21 // view from MCTrayViewController.
22 MESSAGE_CENTER_EXPORT
23 @interface MCTrayController : NSWindowController<NSWindowDelegate> {
24 @private
25 message_center::MessageCenterTray* tray_; // Weak, indirectly owns this.
27 // View controller that provides this window's content.
28 base::scoped_nsobject<MCTrayViewController> viewController_;
30 // An event monitor that listens for clicks outside the tray window to cause
31 // it to close.
32 id clickEventMonitor_;
35 @property(readonly, nonatomic) MCTrayViewController* viewController;
37 // Designated initializer.
38 - (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray;
40 // Opens the message center tray to either the right or left of the given
41 // points, depending on if it will fit on screen. It will try opening to the
42 // right first, but if the window does not fit on screen, it will open to the
43 // left.
44 - (void)showTrayAtRightOf:(NSPoint)rightPoint atLeftOf:(NSPoint)leftPoint;
46 // Callback from MessageCenterTrayDelegate, used to update the tray content.
47 - (void)onMessageCenterTrayChanged;
49 @end
51 #endif // UI_MESSAGE_CENTER_COCOA_TRAY_CONTROLLER_H_