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

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

Issue 6821003: [Mac] First pass at multiple selection in the tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years, 8 months 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
OLDNEW
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_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 #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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 IBOutlet NSView* iconView_; 42 IBOutlet NSView* iconView_;
43 IBOutlet NSTextField* titleView_; 43 IBOutlet NSTextField* titleView_;
44 IBOutlet HoverCloseButton* closeButton_; 44 IBOutlet HoverCloseButton* closeButton_;
45 45
46 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib 46 NSRect originalIconFrame_; // frame of iconView_ as loaded from nib
47 BOOL isIconShowing_; // last state of iconView_ in updateVisibility 47 BOOL isIconShowing_; // last state of iconView_ in updateVisibility
48 48
49 BOOL app_; 49 BOOL app_;
50 BOOL mini_; 50 BOOL mini_;
51 BOOL pinned_; 51 BOOL pinned_;
52 BOOL active_;
52 BOOL selected_; 53 BOOL selected_;
53 GURL url_; 54 GURL url_;
54 TabLoadingState loadingState_; 55 TabLoadingState loadingState_;
55 CGFloat iconTitleXOffset_; // between left edges of icon and title 56 CGFloat iconTitleXOffset_; // between left edges of icon and title
56 id<TabControllerTarget> target_; // weak, where actions are sent 57 id<TabControllerTarget> target_; // weak, where actions are sent
57 SEL action_; // selector sent when tab is selected by clicking 58 SEL action_; // selector sent when tab is selected by clicking
58 scoped_ptr<TabMenuModel> contextMenuModel_; 59 scoped_ptr<ui::SimpleMenuModel> contextMenuModel_;
59 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_; 60 scoped_ptr<TabControllerInternal::MenuDelegate> contextMenuDelegate_;
60 scoped_nsobject<MenuController> contextMenuController_; 61 scoped_nsobject<MenuController> contextMenuController_;
61 } 62 }
62 63
63 @property(assign, nonatomic) TabLoadingState loadingState; 64 @property(assign, nonatomic) TabLoadingState loadingState;
64 65
65 @property(assign, nonatomic) SEL action; 66 @property(assign, nonatomic) SEL action;
66 @property(assign, nonatomic) BOOL app; 67 @property(assign, nonatomic) BOOL app;
67 @property(assign, nonatomic) BOOL mini; 68 @property(assign, nonatomic) BOOL mini;
68 @property(assign, nonatomic) BOOL pinned; 69 @property(assign, nonatomic) BOOL pinned;
70 // Note that |-selected| will return YES if the controller is |-active|, too.
71 // |-setSelected:| affects the selection, while |-setActive:| affects the key
72 // status/focus of the content.
73 @property(assign, nonatomic) BOOL active;
69 @property(assign, nonatomic) BOOL selected; 74 @property(assign, nonatomic) BOOL selected;
70 @property(assign, nonatomic) id target; 75 @property(assign, nonatomic) id target;
71 @property(assign, nonatomic) GURL url; 76 @property(assign, nonatomic) GURL url;
72 @property(assign, nonatomic) NSView* iconView; 77 @property(assign, nonatomic) NSView* iconView;
73 @property(assign, nonatomic) NSTextField* titleView; 78 @property(assign, nonatomic) NSTextField* titleView;
74 @property(assign, nonatomic) HoverCloseButton* closeButton; 79 @property(assign, nonatomic) HoverCloseButton* closeButton;
75 80
76 // Minimum and maximum allowable tab width. The minimum width does not show 81 // Minimum and maximum allowable tab width. The minimum width does not show
77 // the icon or the close button. The selected tab always has at least a close 82 // the icon or the close button. The selected tab always has at least a close
78 // button so it has a different minimum width. 83 // button so it has a different minimum width.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 @end 119 @end
115 120
116 @interface TabController(TestingAPI) 121 @interface TabController(TestingAPI)
117 - (NSString*)toolTip; 122 - (NSString*)toolTip;
118 - (int)iconCapacity; 123 - (int)iconCapacity;
119 - (BOOL)shouldShowIcon; 124 - (BOOL)shouldShowIcon;
120 - (BOOL)shouldShowCloseButton; 125 - (BOOL)shouldShowCloseButton;
121 @end // TabController(TestingAPI) 126 @end // TabController(TestingAPI)
122 127
123 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_ 128 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698