| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #import "chrome/browser/ui/cocoa/hover_close_button.h" | 10 #import "chrome/browser/ui/cocoa/hover_close_button.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // loading content via a spinner. | 33 // loading content via a spinner. |
| 34 // | 34 // |
| 35 // The tab has the notion of an "icon view" which can be used to display | 35 // The tab has the notion of an "icon view" which can be used to display |
| 36 // identifying characteristics such as a favicon, or since it's a full-fledged | 36 // identifying characteristics such as a favicon, or since it's a full-fledged |
| 37 // view, something with state and animation such as a throbber for illustrating | 37 // view, something with state and animation such as a throbber for illustrating |
| 38 // progress. The default in the nib is an image view so nothing special is | 38 // progress. The default in the nib is an image view so nothing special is |
| 39 // required if that's all you need. | 39 // required if that's all you need. |
| 40 | 40 |
| 41 @interface TabController : NSViewController<TabDraggingEventTarget> { | 41 @interface TabController : NSViewController<TabDraggingEventTarget> { |
| 42 @private | 42 @private |
| 43 scoped_nsobject<NSView> iconView_; | 43 base::scoped_nsobject<NSView> iconView_; |
| 44 scoped_nsobject<NSTextField> titleView_; | 44 base::scoped_nsobject<NSTextField> titleView_; |
| 45 scoped_nsobject<HoverCloseButton> closeButton_; | 45 base::scoped_nsobject<HoverCloseButton> closeButton_; |
| 46 | 46 |
| 47 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib | 47 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib |
| 48 BOOL isIconShowing_; // last state of iconView_ in updateVisibility | 48 BOOL isIconShowing_; // last state of iconView_ in updateVisibility |
| 49 | 49 |
| 50 BOOL app_; | 50 BOOL app_; |
| 51 BOOL mini_; | 51 BOOL mini_; |
| 52 BOOL pinned_; | 52 BOOL pinned_; |
| 53 BOOL projecting_; | 53 BOOL projecting_; |
| 54 BOOL active_; | 54 BOOL active_; |
| 55 BOOL selected_; | 55 BOOL selected_; |
| 56 GURL url_; | 56 GURL url_; |
| 57 TabLoadingState loadingState_; | 57 TabLoadingState loadingState_; |
| 58 CGFloat iconTitleXOffset_; // between left edges of icon and title | 58 CGFloat iconTitleXOffset_; // between left edges of icon and title |
| 59 id<TabControllerTarget> target_; // weak, where actions are sent | 59 id<TabControllerTarget> target_; // weak, where actions are sent |
| 60 SEL action_; // selector sent when tab is selected by clicking | 60 SEL action_; // selector sent when tab is selected by clicking |
| 61 scoped_ptr<ui::SimpleMenuModel> contextMenuModel_; | 61 scoped_ptr<ui::SimpleMenuModel> contextMenuModel_; |
| 62 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; | 62 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; |
| 63 scoped_nsobject<MenuController> contextMenuController_; | 63 base::scoped_nsobject<MenuController> contextMenuController_; |
| 64 } | 64 } |
| 65 | 65 |
| 66 @property(assign, nonatomic) TabLoadingState loadingState; | 66 @property(assign, nonatomic) TabLoadingState loadingState; |
| 67 | 67 |
| 68 @property(assign, nonatomic) SEL action; | 68 @property(assign, nonatomic) SEL action; |
| 69 @property(assign, nonatomic) BOOL app; | 69 @property(assign, nonatomic) BOOL app; |
| 70 @property(assign, nonatomic) BOOL mini; | 70 @property(assign, nonatomic) BOOL mini; |
| 71 @property(assign, nonatomic) BOOL pinned; | 71 @property(assign, nonatomic) BOOL pinned; |
| 72 // A tab is called "projecting" when a video/audio stream of its contents is | 72 // A tab is called "projecting" when a video/audio stream of its contents is |
| 73 // being captured and perhaps streamed remotely. We add a favicon glow animation | 73 // being captured and perhaps streamed remotely. We add a favicon glow animation |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 @end | 118 @end |
| 119 | 119 |
| 120 @interface TabController(TestingAPI) | 120 @interface TabController(TestingAPI) |
| 121 - (NSString*)toolTip; | 121 - (NSString*)toolTip; |
| 122 - (int)iconCapacity; | 122 - (int)iconCapacity; |
| 123 - (BOOL)shouldShowIcon; | 123 - (BOOL)shouldShowIcon; |
| 124 - (BOOL)shouldShowCloseButton; | 124 - (BOOL)shouldShowCloseButton; |
| 125 @end // TabController(TestingAPI) | 125 @end // TabController(TestingAPI) |
| 126 | 126 |
| 127 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ | 127 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ |
| OLD | NEW |