| OLD | NEW |
| 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_TABPOSE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABPOSE_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABPOSE_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABPOSE_WINDOW_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // The layer showing the background layer. Covers the whole visible area. | 47 // The layer showing the background layer. Covers the whole visible area. |
| 48 CALayer* bgLayer_; // weak | 48 CALayer* bgLayer_; // weak |
| 49 | 49 |
| 50 // Top gradient. | 50 // Top gradient. |
| 51 CALayer* topGradient_; // weak | 51 CALayer* topGradient_; // weak |
| 52 | 52 |
| 53 // The layer drawn behind the currently selected tile. | 53 // The layer drawn behind the currently selected tile. |
| 54 CALayer* selectionHighlight_; // weak | 54 CALayer* selectionHighlight_; // weak |
| 55 | 55 |
| 56 // Colors used by the layers. | 56 // Colors used by the layers. |
| 57 base::mac::ScopedCFTypeRef<CGColorRef> gray_; | 57 base::ScopedCFTypeRef<CGColorRef> gray_; |
| 58 base::mac::ScopedCFTypeRef<CGColorRef> darkBlue_; | 58 base::ScopedCFTypeRef<CGColorRef> darkBlue_; |
| 59 | 59 |
| 60 TabStripModel* tabStripModel_; // weak | 60 TabStripModel* tabStripModel_; // weak |
| 61 | 61 |
| 62 // Stores all preview layers. The order in here matches the order in | 62 // Stores all preview layers. The order in here matches the order in |
| 63 // the tabstrip model. | 63 // the tabstrip model. |
| 64 scoped_nsobject<NSMutableArray> allThumbnailLayers_; | 64 scoped_nsobject<NSMutableArray> allThumbnailLayers_; |
| 65 | 65 |
| 66 scoped_nsobject<NSMutableArray> allFaviconLayers_; | 66 scoped_nsobject<NSMutableArray> allFaviconLayers_; |
| 67 scoped_nsobject<NSMutableArray> allTitleLayers_; | 67 scoped_nsobject<NSMutableArray> allTitleLayers_; |
| 68 | 68 |
| 69 // Manages the state of all layers. | 69 // Manages the state of all layers. |
| 70 scoped_ptr<tabpose::TileSet> tileSet_; | 70 scoped_ptr<tabpose::TileSet> tileSet_; |
| 71 | 71 |
| 72 // The rectangle of the window that contains all layers. This is the | 72 // The rectangle of the window that contains all layers. This is the |
| 73 // rectangle occupied by |bgLayer_|. | 73 // rectangle occupied by |bgLayer_|. |
| 74 NSRect containingRect_; | 74 NSRect containingRect_; |
| 75 | 75 |
| 76 // Informs us of added/removed/updated tabs. | 76 // Informs us of added/removed/updated tabs. |
| 77 scoped_ptr<TabStripModelObserverBridge> tabStripModelObserverBridge_; | 77 scoped_ptr<TabStripModelObserverBridge> tabStripModelObserverBridge_; |
| 78 | 78 |
| 79 // The icon used for the closebutton layers. | 79 // The icon used for the closebutton layers. |
| 80 base::mac::ScopedCFTypeRef<CGImageRef> closeIcon_; | 80 base::ScopedCFTypeRef<CGImageRef> closeIcon_; |
| 81 | 81 |
| 82 // True if all close layers should be shown (as opposed to just the close | 82 // True if all close layers should be shown (as opposed to just the close |
| 83 // layer of the currently selected thumbnail). | 83 // layer of the currently selected thumbnail). |
| 84 BOOL showAllCloseLayers_; | 84 BOOL showAllCloseLayers_; |
| 85 } | 85 } |
| 86 | 86 |
| 87 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. | 87 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. |
| 88 // If |slomo| is YES, then the appearance animation is shown in slow motion. | 88 // If |slomo| is YES, then the appearance animation is shown in slow motion. |
| 89 // The window blocks all keyboard and mouse events and releases itself when | 89 // The window blocks all keyboard and mouse events and releases itself when |
| 90 // closed. | 90 // closed. |
| 91 + (id)openTabposeFor:(NSWindow*)parent | 91 + (id)openTabposeFor:(NSWindow*)parent |
| 92 rect:(NSRect)rect | 92 rect:(NSRect)rect |
| 93 slomo:(BOOL)slomo | 93 slomo:(BOOL)slomo |
| 94 tabStripModel:(TabStripModel*)tabStripModel; | 94 tabStripModel:(TabStripModel*)tabStripModel; |
| 95 @end | 95 @end |
| 96 | 96 |
| 97 @interface TabposeWindow (TestingAPI) | 97 @interface TabposeWindow (TestingAPI) |
| 98 - (void)selectTileAtIndexWithoutAnimation:(int)newIndex; | 98 - (void)selectTileAtIndexWithoutAnimation:(int)newIndex; |
| 99 - (NSUInteger)thumbnailLayerCount; | 99 - (NSUInteger)thumbnailLayerCount; |
| 100 - (int)selectedIndex; | 100 - (int)selectedIndex; |
| 101 @end | 101 @end |
| 102 | 102 |
| 103 #endif // CHROME_BROWSER_UI_COCOA_TABPOSE_WINDOW_H_ | 103 #endif // CHROME_BROWSER_UI_COCOA_TABPOSE_WINDOW_H_ |
| OLD | NEW |