| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_TAB_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #import "chrome/browser/cocoa/hover_close_button.h" | 10 #import "chrome/browser/cocoa/hover_close_button.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 + (CGFloat)miniTabWidth; | 79 + (CGFloat)miniTabWidth; |
| 80 + (CGFloat)appTabWidth; | 80 + (CGFloat)appTabWidth; |
| 81 | 81 |
| 82 // The view associated with this controller, pre-casted as a TabView | 82 // The view associated with this controller, pre-casted as a TabView |
| 83 - (TabView*)tabView; | 83 - (TabView*)tabView; |
| 84 | 84 |
| 85 // Closes the associated TabView by relaying the message to |target_| to | 85 // Closes the associated TabView by relaying the message to |target_| to |
| 86 // perform the close. | 86 // perform the close. |
| 87 - (IBAction)closeTab:(id)sender; | 87 - (IBAction)closeTab:(id)sender; |
| 88 | 88 |
| 89 // Return the set of hover |
| 90 - (BOOL)hovered; |
| 91 |
| 89 // Replace the current icon view with the given view. |iconView| will be | 92 // Replace the current icon view with the given view. |iconView| will be |
| 90 // resized to the size of the current icon view. | 93 // resized to the size of the current icon view. |
| 91 - (void)setIconView:(NSView*)iconView; | 94 - (void)setIconView:(NSView*)iconView; |
| 92 - (NSView*)iconView; | 95 - (NSView*)iconView; |
| 93 | 96 |
| 94 // Called by the tabs to determine whether we are in rapid (tab) closure mode. | 97 // Called by the tabs to determine whether we are in rapid (tab) closure mode. |
| 95 // In this mode, we handle clicks slightly differently due to animation. | 98 // In this mode, we handle clicks slightly differently due to animation. |
| 96 // Ideally, tabs would know about their own animation and wouldn't need this. | 99 // Ideally, tabs would know about their own animation and wouldn't need this. |
| 97 - (BOOL)inRapidClosureMode; | 100 - (BOOL)inRapidClosureMode; |
| 98 | 101 |
| 99 // Updates the visibility of certain subviews, such as the icon and close | 102 // Updates the visibility of certain subviews, such as the icon and close |
| 100 // button, based on criteria such as the tab's selected state and its current | 103 // button, based on criteria such as the tab's selected state and its current |
| 101 // width. | 104 // width. |
| 102 - (void)updateVisibility; | 105 - (void)updateVisibility; |
| 103 | 106 |
| 104 // Update the title color to match the tabs current state. | 107 // Update the title color to match the tabs current state. |
| 105 - (void)updateTitleColor; | 108 - (void)updateTitleColor; |
| 106 @end | 109 @end |
| 107 | 110 |
| 108 @interface TabController(TestingAPI) | 111 @interface TabController(TestingAPI) |
| 109 - (NSString*)toolTip; | 112 - (NSString*)toolTip; |
| 110 - (int)iconCapacity; | 113 - (int)iconCapacity; |
| 111 - (BOOL)shouldShowIcon; | 114 - (BOOL)shouldShowIcon; |
| 112 - (BOOL)shouldShowCloseButton; | 115 - (BOOL)shouldShowCloseButton; |
| 113 @end // TabController(TestingAPI) | 116 @end // TabController(TestingAPI) |
| 114 | 117 |
| 115 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ | 118 #endif // CHROME_BROWSER_COCOA_TAB_CONTROLLER_H_ |
| OLD | NEW |