OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_COCOA_TABPOSE_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ |
6 #define CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ | 6 #define CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 CALayer* selectionHighlight_; // weak | 52 CALayer* selectionHighlight_; // weak |
53 | 53 |
54 // Colors used by the layers. | 54 // Colors used by the layers. |
55 scoped_cftyperef<CGColorRef> gray_; | 55 scoped_cftyperef<CGColorRef> gray_; |
56 scoped_cftyperef<CGColorRef> darkBlue_; | 56 scoped_cftyperef<CGColorRef> darkBlue_; |
57 | 57 |
58 TabStripModel* tabStripModel_; // weak | 58 TabStripModel* tabStripModel_; // weak |
59 | 59 |
60 // Stores all preview layers. The order in here matches the order in | 60 // Stores all preview layers. The order in here matches the order in |
61 // the tabstrip model. | 61 // the tabstrip model. |
62 scoped_nsobject<NSArray> allThumbnailLayers_; | 62 scoped_nsobject<NSMutableArray> allThumbnailLayers_; |
63 | 63 |
64 scoped_nsobject<NSArray> allFaviconLayers_; | 64 scoped_nsobject<NSMutableArray> allFaviconLayers_; |
65 scoped_nsobject<NSArray> allTitleLayers_; | 65 scoped_nsobject<NSMutableArray> allTitleLayers_; |
66 | 66 |
67 // Manages the state of all layers. | 67 // Manages the state of all layers. |
68 scoped_ptr<tabpose::TileSet> tileSet_; | 68 scoped_ptr<tabpose::TileSet> tileSet_; |
69 | 69 |
70 // The rectangle of the window that contains all layers. This is the | 70 // The rectangle of the window that contains all layers. This is the |
71 // rectangle occupied by |bgLayer_|. | 71 // rectangle occupied by |bgLayer_|. |
72 NSRect containingRect_; | 72 NSRect containingRect_; |
73 | 73 |
74 // Informs us of added/removed/updated tabs. | 74 // Informs us of added/removed/updated tabs. |
75 scoped_ptr<TabStripModelObserverBridge> tabStripModelObserverBridge_; | 75 scoped_ptr<TabStripModelObserverBridge> tabStripModelObserverBridge_; |
76 } | 76 } |
77 | 77 |
78 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. | 78 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. |
79 // If |slomo| is YES, then the appearance animation is shown in slow motion. | 79 // If |slomo| is YES, then the appearance animation is shown in slow motion. |
80 // The window blocks all keyboard and mouse events and releases itself when | 80 // The window blocks all keyboard and mouse events and releases itself when |
81 // closed. | 81 // closed. |
82 + (id)openTabposeFor:(NSWindow*)parent | 82 + (id)openTabposeFor:(NSWindow*)parent |
83 rect:(NSRect)rect | 83 rect:(NSRect)rect |
84 slomo:(BOOL)slomo | 84 slomo:(BOOL)slomo |
85 tabStripModel:(TabStripModel*)tabStripModel; | 85 tabStripModel:(TabStripModel*)tabStripModel; |
86 @end | 86 @end |
87 | 87 |
88 @interface TabposeWindow (TestingAPI) | 88 @interface TabposeWindow (TestingAPI) |
89 - (void)selectTileAtIndexWithoutAnimation:(int)newIndex; | 89 - (void)selectTileAtIndexWithoutAnimation:(int)newIndex; |
90 - (NSUInteger)thumbnailLayerCount; | 90 - (NSUInteger)thumbnailLayerCount; |
91 - (int)selectedIndex; | 91 - (int)selectedIndex; |
92 @end | 92 @end |
93 | 93 |
94 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ | 94 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ |
OLD | NEW |