Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / tabs / tab_strip_view.h
blobc9196711c24396da57c4853b2c7b4d6a13ee29fd
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.
5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/mac/scoped_nsobject.h"
11 #import "chrome/browser/ui/cocoa/background_gradient_view.h"
12 #import "chrome/browser/ui/cocoa/url_drop_target.h"
14 @class NewTabButton;
15 @class TabStripController;
17 // A view class that handles rendering the tab strip and drops of URLS with
18 // a positioning locator for drop feedback.
20 @interface TabStripView : BackgroundGradientView<URLDropTarget> {
21 @private
22 TabStripController* controller_; // Weak; owns us.
24 NSTimeInterval lastMouseUp_;
26 // Handles being a drag-and-drop target.
27 base::scoped_nsobject<URLDropTargetHandler> dropHandler_;
29 base::scoped_nsobject<NewTabButton> newTabButton_;
31 // Whether the drop-indicator arrow is shown, and if it is, the coordinate of
32 // its tip.
33 BOOL dropArrowShown_;
34 NSPoint dropArrowPosition_;
37 @property(assign, nonatomic) BOOL dropArrowShown;
38 @property(assign, nonatomic) NSPoint dropArrowPosition;
40 // Name starts with "get" because methods staring with "new" return retained
41 // objects according to Cocoa's create rule.
42 - (NewTabButton*)getNewTabButton;
44 @end
46 // Interface for the controller to set and clear the weak reference to itself.
47 @interface TabStripView (TabStripControllerInterface)
48 - (void)setController:(TabStripController*)controller;
49 @end
51 // Protected methods subclasses can override to alter behavior. Clients should
52 // not call these directly.
53 @interface TabStripView (Protected)
54 - (void)drawBottomBorder:(NSRect)bounds;
55 - (BOOL)doubleClickMinimizesWindow;
56 @end
58 @interface TabStripView (TestingAPI)
59 - (void)setNewTabButton:(NewTabButton*)button;
60 @end
62 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_VIEW_H_