| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <ApplicationServices/ApplicationServices.h> | 9 #include <ApplicationServices/ApplicationServices.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // This is more complicated than a simple on/off since we want to allow the | 23 // This is more complicated than a simple on/off since we want to allow the |
| 24 // alert glow to go through a full rise-hold-fall cycle to avoid flickering (or | 24 // alert glow to go through a full rise-hold-fall cycle to avoid flickering (or |
| 25 // always holding). | 25 // always holding). |
| 26 enum AlertState { | 26 enum AlertState { |
| 27 kAlertNone = 0, // Obj-C initializes to this. | 27 kAlertNone = 0, // Obj-C initializes to this. |
| 28 kAlertRising, | 28 kAlertRising, |
| 29 kAlertHolding, | 29 kAlertHolding, |
| 30 kAlertFalling | 30 kAlertFalling |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // When the window doesn't have focus then we want to draw the button with a |
| 34 // slightly lighter color. We do this by just reducing the alpha. |
| 35 const CGFloat kImageNoFocusAlpha = 0.65; |
| 36 |
| 33 } // namespace tabs | 37 } // namespace tabs |
| 34 | 38 |
| 35 @class TabController, TabWindowController; | 39 @class TabController, TabWindowController; |
| 36 | 40 |
| 37 // A view that handles the event tracking (clicking and dragging) for a tab | 41 // A view that handles the event tracking (clicking and dragging) for a tab |
| 38 // on the tab strip. Relies on an associated TabController to provide a | 42 // on the tab strip. Relies on an associated TabController to provide a |
| 39 // target/action for selecting the tab. | 43 // target/action for selecting the tab. |
| 40 | 44 |
| 41 @interface TabView : NSView { | 45 @interface TabView : NSView { |
| 42 @private | 46 @private |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 115 |
| 112 // The TabController |controller_| is not the only owner of this view. If the | 116 // The TabController |controller_| is not the only owner of this view. If the |
| 113 // controller is released before this view, then we could be hanging onto a | 117 // controller is released before this view, then we could be hanging onto a |
| 114 // garbage pointer. To prevent this, the TabController uses this interface to | 118 // garbage pointer. To prevent this, the TabController uses this interface to |
| 115 // clear the |controller_| pointer when it is dying. | 119 // clear the |controller_| pointer when it is dying. |
| 116 @interface TabView (TabControllerInterface) | 120 @interface TabView (TabControllerInterface) |
| 117 - (void)setController:(TabController*)controller; | 121 - (void)setController:(TabController*)controller; |
| 118 @end | 122 @end |
| 119 | 123 |
| 120 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ | 124 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_VIEW_H_ |
| OLD | NEW |