Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/ui/cocoa/tab_controller.h

Issue 5703007: Mac: Correctly clip tab title... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_UI_COCOA_TAB_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TAB_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TAB_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_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/ui/cocoa/hover_close_button.h" 10 #import "chrome/browser/ui/cocoa/hover_close_button.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib 45 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib
46 BOOL isIconShowing_; // last state of iconView_ in updateVisibility 46 BOOL isIconShowing_; // last state of iconView_ in updateVisibility
47 47
48 BOOL app_; 48 BOOL app_;
49 BOOL mini_; 49 BOOL mini_;
50 BOOL pinned_; 50 BOOL pinned_;
51 BOOL selected_; 51 BOOL selected_;
52 TabLoadingState loadingState_; 52 TabLoadingState loadingState_;
53 CGFloat iconTitleXOffset_; // between left edges of icon and title 53 CGFloat iconTitleXOffset_; // between left edges of icon and title
54 CGFloat titleCloseWidthOffset_; // between right edges of icon and close btn.
55 id<TabControllerTarget> target_; // weak, where actions are sent 54 id<TabControllerTarget> target_; // weak, where actions are sent
56 SEL action_; // selector sent when tab is selected by clicking 55 SEL action_; // selector sent when tab is selected by clicking
57 scoped_ptr<TabMenuModel> contextMenuModel_; 56 scoped_ptr<TabMenuModel> contextMenuModel_;
58 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; 57 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_;
59 scoped_nsobject<MenuController> contextMenuController_; 58 scoped_nsobject<MenuController> contextMenuController_;
60 } 59 }
61 60
62 @property(assign, nonatomic) TabLoadingState loadingState; 61 @property(assign, nonatomic) TabLoadingState loadingState;
63 62
64 @property(assign, nonatomic) SEL action; 63 @property(assign, nonatomic) SEL action;
65 @property(assign, nonatomic) BOOL app; 64 @property(assign, nonatomic) BOOL app;
66 @property(assign, nonatomic) BOOL mini; 65 @property(assign, nonatomic) BOOL mini;
67 @property(assign, nonatomic) BOOL pinned; 66 @property(assign, nonatomic) BOOL pinned;
68 @property(assign, nonatomic) BOOL selected; 67 @property(assign, nonatomic) BOOL selected;
69 @property(assign, nonatomic) id target; 68 @property(assign, nonatomic) id target;
69 @property(assign, nonatomic) NSView* iconView;
70 @property(assign, nonatomic) NSTextField* titleView;
71 @property(assign, nonatomic) HoverCloseButton* closeButton;
70 72
71 // Minimum and maximum allowable tab width. The minimum width does not show 73 // Minimum and maximum allowable tab width. The minimum width does not show
72 // the icon or the close button. The selected tab always has at least a close 74 // the icon or the close button. The selected tab always has at least a close
73 // button so it has a different minimum width. 75 // button so it has a different minimum width.
74 + (CGFloat)minTabWidth; 76 + (CGFloat)minTabWidth;
75 + (CGFloat)maxTabWidth; 77 + (CGFloat)maxTabWidth;
76 + (CGFloat)minSelectedTabWidth; 78 + (CGFloat)minSelectedTabWidth;
77 + (CGFloat)miniTabWidth; 79 + (CGFloat)miniTabWidth;
78 + (CGFloat)appTabWidth; 80 + (CGFloat)appTabWidth;
79 81
(...skipping 24 matching lines...) Expand all
104 @end 106 @end
105 107
106 @interface TabController(TestingAPI) 108 @interface TabController(TestingAPI)
107 - (NSString*)toolTip; 109 - (NSString*)toolTip;
108 - (int)iconCapacity; 110 - (int)iconCapacity;
109 - (BOOL)shouldShowIcon; 111 - (BOOL)shouldShowIcon;
110 - (BOOL)shouldShowCloseButton; 112 - (BOOL)shouldShowCloseButton;
111 @end // TabController(TestingAPI) 113 @end // TabController(TestingAPI)
112 114
113 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTROLLER_H_ 115 #endif // CHROME_BROWSER_UI_COCOA_TAB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698