Home | History | Annotate | Download | only in cocoa
      1 // Copyright (c) 2012 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.
      4 
      5 #import <Cocoa/Cocoa.h>
      6 
      7 #include "base/memory/scoped_ptr.h"
      8 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
      9 
     10 class AppNotificationBridge;
     11 
     12 namespace info_bubble {
     13 
     14 enum AnimationMask {
     15   kAnimateNone = 0,
     16   kAnimateOrderIn = 1 << 1,
     17   kAnimateOrderOut = 1 << 2,
     18 };
     19 typedef NSUInteger AllowedAnimations;
     20 
     21 }  // namespace info_bubble
     22 
     23 // A rounded window with an arrow used for example when you click on the STAR
     24 // button or that pops up within our first-run UI.
     25 @interface InfoBubbleWindow : ChromeEventProcessingWindow {
     26  @private
     27   // Is self in the process of closing.
     28   BOOL closing_;
     29   // Specifies if window order in and order out animations are allowed. By
     30   // default both types of animations are allowed.
     31   info_bubble::AllowedAnimations allowedAnimations_;
     32   // If NO the window will never become key.
     33   // Default YES.
     34   BOOL canBecomeKeyWindow_;
     35   // Bridge to proxy Chrome notifications to the window.
     36   scoped_ptr<AppNotificationBridge> notificationBridge_;
     37 }
     38 
     39 @property(nonatomic) info_bubble::AllowedAnimations allowedAnimations;
     40 @property(nonatomic) BOOL canBecomeKeyWindow;
     41 
     42 // Returns YES if the window is in the process of closing.
     43 // Can't use "windowWillClose" notification because that will be sent
     44 // after the closing animation has completed.
     45 - (BOOL)isClosing;
     46 
     47 @end
     48