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

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

Issue 13867007: Tab audio indicator: Use animation container on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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_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 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" 12 #import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h"
13 #import "chrome/browser/ui/cocoa/url_drop_target.h" 13 #import "chrome/browser/ui/cocoa/url_drop_target.h"
14 #include "chrome/browser/ui/tabs/hover_tab_selector.h" 14 #include "chrome/browser/ui/tabs/hover_tab_selector.h"
15 15
16 @class CrTrackingArea; 16 @class CrTrackingArea;
17 @class NewTabButton; 17 @class NewTabButton;
18 @class TabContentsController; 18 @class TabContentsController;
19 @class TabView; 19 @class TabView;
20 @class TabStripDragController; 20 @class TabStripDragController;
21 @class TabStripView; 21 @class TabStripView;
22 22
23 class Browser; 23 class Browser;
24 class TabStripModelObserverBridge; 24 class TabStripModelObserverBridge;
25 class TabStripModel; 25 class TabStripModel;
26 26
27 namespace content { 27 namespace content {
28 class WebContents; 28 class WebContents;
29 } 29 }
30 namespace ui {
31 class AnimationContainer;
32 }
30 33
31 // The interface for the tab strip controller's delegate. 34 // The interface for the tab strip controller's delegate.
32 // Delegating TabStripModelObserverBridge's events (in lieu of directly 35 // Delegating TabStripModelObserverBridge's events (in lieu of directly
33 // subscribing to TabStripModelObserverBridge events, as TabStripController 36 // subscribing to TabStripModelObserverBridge events, as TabStripController
34 // does) is necessary to guarantee a proper order of subviews layout updates, 37 // does) is necessary to guarantee a proper order of subviews layout updates,
35 // otherwise it might trigger unnesessary content relayout, UI flickering etc. 38 // otherwise it might trigger unnesessary content relayout, UI flickering etc.
36 @protocol TabStripControllerDelegate 39 @protocol TabStripControllerDelegate
37 40
38 // Stripped down version of TabStripModelObserverBridge:selectTabWithContents. 41 // Stripped down version of TabStripModelObserverBridge:selectTabWithContents.
39 - (void)onActivateTabWithContents:(content::WebContents*)contents; 42 - (void)onActivateTabWithContents:(content::WebContents*)contents;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // The amount by which to indent the tabs on the sides (to make room for the 134 // The amount by which to indent the tabs on the sides (to make room for the
132 // red/yellow/green and incognito/fullscreen buttons). 135 // red/yellow/green and incognito/fullscreen buttons).
133 CGFloat leftIndentForControls_; 136 CGFloat leftIndentForControls_;
134 CGFloat rightIndentForControls_; 137 CGFloat rightIndentForControls_;
135 138
136 // Is the mouse currently inside the strip; 139 // Is the mouse currently inside the strip;
137 BOOL mouseInside_; 140 BOOL mouseInside_;
138 141
139 // Helper for performing tab selection as a result of dragging over a tab. 142 // Helper for performing tab selection as a result of dragging over a tab.
140 scoped_ptr<HoverTabSelector> hoverTabSelector_; 143 scoped_ptr<HoverTabSelector> hoverTabSelector_;
144
145 scoped_refptr<ui::AnimationContainer> animationContainer_;
141 } 146 }
142 147
143 @property(nonatomic) CGFloat leftIndentForControls; 148 @property(nonatomic) CGFloat leftIndentForControls;
144 @property(nonatomic) CGFloat rightIndentForControls; 149 @property(nonatomic) CGFloat rightIndentForControls;
145 150
146 // Initialize the controller with a view and browser that contains 151 // Initialize the controller with a view and browser that contains
147 // everything else we'll need. |switchView| is the view whose contents get 152 // everything else we'll need. |switchView| is the view whose contents get
148 // "switched" every time the user switches tabs. The children of this view 153 // "switched" every time the user switches tabs. The children of this view
149 // will be released, so if you want them to stay around, make sure 154 // will be released, so if you want them to stay around, make sure
150 // you have retained them. 155 // you have retained them.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 238
234 // Returns the currently active TabContentsController. 239 // Returns the currently active TabContentsController.
235 - (TabContentsController*)activeTabContentsController; 240 - (TabContentsController*)activeTabContentsController;
236 241
237 @end 242 @end
238 243
239 // Returns the parent view to use when showing a sheet for a given web contents. 244 // Returns the parent view to use when showing a sheet for a given web contents.
240 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); 245 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents);
241 246
242 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ 247 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698