Home | History | Annotate | Download | only in tabs
      1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_
      6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_
      7 #pragma once
      8 
      9 #import <Cocoa/Cocoa.h>
     10 
     11 #include "base/memory/scoped_nsobject.h"
     12 #import "chrome/browser/ui/cocoa/url_drop_target.h"
     13 
     14 @class NewTabButton;
     15 @class ProfileMenuButton;
     16 
     17 // A view class that handles rendering the tab strip and drops of URLS with
     18 // a positioning locator for drop feedback.
     19 
     20 @interface TabStripView : NSView<URLDropTarget> {
     21  @private
     22   NSTimeInterval lastMouseUp_;
     23 
     24   // Handles being a drag-and-drop target.
     25   scoped_nsobject<URLDropTargetHandler> dropHandler_;
     26 
     27   // Weak; the following come from the nib.
     28   NewTabButton* newTabButton_;
     29   ProfileMenuButton* profileMenuButton_;
     30 
     31   // Whether the drop-indicator arrow is shown, and if it is, the coordinate of
     32   // its tip.
     33   BOOL dropArrowShown_;
     34   NSPoint dropArrowPosition_;
     35 }
     36 
     37 @property(assign, nonatomic) IBOutlet NewTabButton* newTabButton;
     38 @property(assign, nonatomic) IBOutlet ProfileMenuButton* profileMenuButton;
     39 @property(assign, nonatomic) BOOL dropArrowShown;
     40 @property(assign, nonatomic) NSPoint dropArrowPosition;
     41 
     42 @end
     43 
     44 // Protected methods subclasses can override to alter behavior. Clients should
     45 // not call these directly.
     46 @interface TabStripView(Protected)
     47 - (void)drawBottomBorder:(NSRect)bounds;
     48 - (BOOL)doubleClickMinimizesWindow;
     49 @end
     50 
     51 #endif  // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_
     52