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

Side by Side Diff: chrome/browser/cocoa/tabpose_window.h

Issue 3163003: Mac tabpose: Add thumbnails (Closed)
Patch Set: '' Created 10 years, 3 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
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.h ('k') | chrome/browser/cocoa/tabpose_window.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 25
26 enum WindowState { 26 enum WindowState {
27 kFadingIn, 27 kFadingIn,
28 kFadedIn, 28 kFadedIn,
29 kFadingOut, 29 kFadingOut,
30 }; 30 };
31 31
32 } // namespace tabpose 32 } // namespace tabpose
33 33
34 class TabStripModel; 34 class TabStripModel;
35 class TabStripModelObserverBridge;
35 36
36 // A TabposeWindow shows an overview of open tabs and lets the user select a new 37 // A TabposeWindow shows an overview of open tabs and lets the user select a new
37 // active tab. The window blocks clicks on the tab strip and the download 38 // active tab. The window blocks clicks on the tab strip and the download
38 // shelf. Every open browser window has its own overlay, and they are 39 // shelf. Every open browser window has its own overlay, and they are
39 // independent of each other. 40 // independent of each other.
40 @interface TabposeWindow : NSWindow { 41 @interface TabposeWindow : NSWindow {
41 @private 42 @private
42 tabpose::WindowState state_; 43 tabpose::WindowState state_;
43 44
44 // The root layer added to the content view. Covers the whole window. 45 // The root layer added to the content view. Covers the whole window.
(...skipping 13 matching lines...) Expand all
58 59
59 // 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
60 // the tabstrip model. 61 // the tabstrip model.
61 scoped_nsobject<NSArray> allThumbnailLayers_; 62 scoped_nsobject<NSArray> allThumbnailLayers_;
62 63
63 scoped_nsobject<NSArray> allFaviconLayers_; 64 scoped_nsobject<NSArray> allFaviconLayers_;
64 scoped_nsobject<NSArray> allTitleLayers_; 65 scoped_nsobject<NSArray> allTitleLayers_;
65 66
66 // Manages the state of all layers. 67 // Manages the state of all layers.
67 scoped_ptr<tabpose::TileSet> tileSet_; 68 scoped_ptr<tabpose::TileSet> tileSet_;
69
70 // The rectangle of the window that contains all layers. This is the
71 // rectangle occupied by |bgLayer_|.
72 NSRect containingRect_;
73
74 // Informs us of added/removed/updated tabs.
75 scoped_ptr<TabStripModelObserverBridge> tabStripModelObserverBridge_;
68 } 76 }
69 77
70 // 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.
71 // 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.
72 // 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
73 // closed. 81 // closed.
74 + (id)openTabposeFor:(NSWindow*)parent 82 + (id)openTabposeFor:(NSWindow*)parent
75 rect:(NSRect)rect 83 rect:(NSRect)rect
76 slomo:(BOOL)slomo 84 slomo:(BOOL)slomo
77 tabStripModel:(TabStripModel*)tabStripModel; 85 tabStripModel:(TabStripModel*)tabStripModel;
78 @end 86 @end
79 87
88 @interface TabposeWindow (TestingAPI)
89 - (void)selectTileAtIndexWithoutAnimation:(int)newIndex;
90 - (NSUInteger)thumbnailLayerCount;
91 - (int)selectedIndex;
92 @end
93
80 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ 94 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.h ('k') | chrome/browser/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698