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

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

Issue 7080064: [Mac] Refactor the logic of tab dragging out of TabView and into a new helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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_STRIP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 #include "base/memory/scoped_nsobject.h" 11 #include "base/memory/scoped_nsobject.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 13 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
14 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" 14 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
15 #import "chrome/browser/ui/cocoa/url_drop_target.h" 15 #import "chrome/browser/ui/cocoa/url_drop_target.h"
16 #include "chrome/browser/ui/tabs/hover_tab_selector.h" 16 #include "chrome/browser/ui/tabs/hover_tab_selector.h"
17 #import "third_party/GTM/AppKit/GTMWindowSheetController.h" 17 #import "third_party/GTM/AppKit/GTMWindowSheetController.h"
18 18
19 @class CrTrackingArea; 19 @class CrTrackingArea;
20 @class NewTabButton; 20 @class NewTabButton;
21 @class ProfileMenuButton; 21 @class ProfileMenuButton;
22 @class TabContentsController; 22 @class TabContentsController;
23 @class TabView; 23 @class TabView;
24 @class TabStripDragController;
24 @class TabStripView; 25 @class TabStripView;
25 26
26 class Browser; 27 class Browser;
27 class ConstrainedWindowMac; 28 class ConstrainedWindowMac;
28 class TabStripModelObserverBridge; 29 class TabStripModelObserverBridge;
29 class TabStripModel; 30 class TabStripModel;
30 class TabContents; 31 class TabContents;
31 class ToolbarModel; 32 class ToolbarModel;
32 33
33 namespace TabStripControllerInternal { 34 namespace TabStripControllerInternal {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 BOOL verticalLayout_; 74 BOOL verticalLayout_;
74 75
75 @private 76 @private
76 scoped_nsobject<TabStripView> tabStripView_; 77 scoped_nsobject<TabStripView> tabStripView_;
77 NSView* switchView_; // weak 78 NSView* switchView_; // weak
78 scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags 79 scoped_nsobject<NSView> dragBlockingView_; // avoid bad window server drags
79 NewTabButton* newTabButton_; // weak, obtained from the nib. 80 NewTabButton* newTabButton_; // weak, obtained from the nib.
80 ProfileMenuButton* profileMenuButton_; // weak, obtained from the nib. 81 ProfileMenuButton* profileMenuButton_; // weak, obtained from the nib.
81 BOOL hasUpdatedProfileMenuButtonXOffset_; 82 BOOL hasUpdatedProfileMenuButtonXOffset_;
82 83
84 // The controller that manages all the interactions of dragging tabs.
85 scoped_nsobject<TabStripDragController> dragController_;
86
83 // Tracks the newTabButton_ for rollovers. 87 // Tracks the newTabButton_ for rollovers.
84 scoped_nsobject<CrTrackingArea> newTabTrackingArea_; 88 scoped_nsobject<CrTrackingArea> newTabTrackingArea_;
85 scoped_ptr<TabStripModelObserverBridge> bridge_; 89 scoped_ptr<TabStripModelObserverBridge> bridge_;
86 Browser* browser_; // weak 90 Browser* browser_; // weak
87 TabStripModel* tabStripModel_; // weak 91 TabStripModel* tabStripModel_; // weak
88 // Delegate that is informed about tab state changes. 92 // Delegate that is informed about tab state changes.
89 id<TabStripControllerDelegate> delegate_; // weak 93 id<TabStripControllerDelegate> delegate_; // weak
90 94
91 // YES if the new tab button is currently displaying the hover image (if the 95 // YES if the new tab button is currently displaying the hover image (if the
92 // mouse is currently over the button). 96 // mouse is currently over the button).
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window; 274 - (void)attachConstrainedWindow:(ConstrainedWindowMac*)window;
271 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window; 275 - (void)removeConstrainedWindow:(ConstrainedWindowMac*)window;
272 276
273 @end 277 @end
274 278
275 // Notification sent when the number of tabs changes. The object will be this 279 // Notification sent when the number of tabs changes. The object will be this
276 // controller. 280 // controller.
277 extern NSString* const kTabStripNumberOfTabsChanged; 281 extern NSString* const kTabStripNumberOfTabsChanged;
278 282
279 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ 283 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698