| 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_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" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // The interface for the tab strip controller's delegate. | 32 // The interface for the tab strip controller's delegate. |
| 33 // Delegating TabStripModelObserverBridge's events (in lieu of directly | 33 // Delegating TabStripModelObserverBridge's events (in lieu of directly |
| 34 // subscribing to TabStripModelObserverBridge events, as TabStripController | 34 // subscribing to TabStripModelObserverBridge events, as TabStripController |
| 35 // does) is necessary to guarantee a proper order of subviews layout updates, | 35 // does) is necessary to guarantee a proper order of subviews layout updates, |
| 36 // otherwise it might trigger unnesessary content relayout, UI flickering etc. | 36 // otherwise it might trigger unnesessary content relayout, UI flickering etc. |
| 37 @protocol TabStripControllerDelegate | 37 @protocol TabStripControllerDelegate |
| 38 | 38 |
| 39 // Stripped down version of TabStripModelObserverBridge:selectTabWithContents. | 39 // Stripped down version of TabStripModelObserverBridge:selectTabWithContents. |
| 40 - (void)onActivateTabWithContents:(content::WebContents*)contents; | 40 - (void)onActivateTabWithContents:(content::WebContents*)contents; |
| 41 | 41 |
| 42 // Stripped down version of TabStripModelObserverBridge:tabReplacedWithContents. | |
| 43 - (void)onReplaceTabWithContents:(content::WebContents*)contents; | |
| 44 | |
| 45 // Stripped down version of TabStripModelObserverBridge:tabChangedWithContents. | 42 // Stripped down version of TabStripModelObserverBridge:tabChangedWithContents. |
| 46 - (void)onTabChanged:(TabStripModelObserver::TabChangeType)change | 43 - (void)onTabChanged:(TabStripModelObserver::TabChangeType)change |
| 47 withContents:(content::WebContents*)contents; | 44 withContents:(content::WebContents*)contents; |
| 48 | 45 |
| 49 // Stripped down version of TabStripModelObserverBridge:tabDetachedWithContents. | 46 // Stripped down version of TabStripModelObserverBridge:tabDetachedWithContents. |
| 50 - (void)onTabDetachedWithContents:(content::WebContents*)contents; | 47 - (void)onTabDetachedWithContents:(content::WebContents*)contents; |
| 51 | 48 |
| 52 // Stripped down version of TabStripModelObserverBridge:insertTabWithContents. | |
| 53 - (void)onInsertTabWithContents:(content::WebContents*)contents; | |
| 54 | |
| 55 @end | 49 @end |
| 56 | 50 |
| 57 // A class that handles managing the tab strip in a browser window. It uses | 51 // A class that handles managing the tab strip in a browser window. It uses |
| 58 // a supporting C++ bridge object to register for notifications from the | 52 // a supporting C++ bridge object to register for notifications from the |
| 59 // TabStripModel. The Obj-C part of this class handles drag and drop and all | 53 // TabStripModel. The Obj-C part of this class handles drag and drop and all |
| 60 // the other Cocoa-y aspects. | 54 // the other Cocoa-y aspects. |
| 61 // | 55 // |
| 62 // For a full description of the design, see | 56 // For a full description of the design, see |
| 63 // http://www.chromium.org/developers/design-documents/tab-strip-mac | 57 // http://www.chromium.org/developers/design-documents/tab-strip-mac |
| 64 @interface TabStripController : | 58 @interface TabStripController : |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 251 |
| 258 // Returns the currently active TabContentsController. | 252 // Returns the currently active TabContentsController. |
| 259 - (TabContentsController*)activeTabContentsController; | 253 - (TabContentsController*)activeTabContentsController; |
| 260 | 254 |
| 261 @end | 255 @end |
| 262 | 256 |
| 263 // Returns the parent view to use when showing a sheet for a given web contents. | 257 // Returns the parent view to use when showing a sheet for a given web contents. |
| 264 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); | 258 NSView* GetSheetParentViewForWebContents(content::WebContents* web_contents); |
| 265 | 259 |
| 266 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ | 260 #endif // CHROME_BROWSER_UI_COCOA_TABS_TAB_STRIP_CONTROLLER_H_ |
| OLD | NEW |