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

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

Issue 3063031: Mac: more tabpose (Closed)
Patch Set: comments Created 10 years, 4 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
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
11 #include "base/scoped_cftyperef.h" 11 #include "base/scoped_cftyperef.h"
12 12
13 #include "base/ref_counted.h"
14 #include "base/scoped_nsobject.h"
15 #include "base/scoped_ptr.h"
16 #include "base/scoped_vector.h"
17
18 namespace tabpose {
19
20 class Tile;
21 class TileSet;
22
23 }
24
25 namespace tabpose {
26
27 enum WindowState {
28 kFadingIn,
29 kFadedIn,
30 kFadingOut,
31 };
32
33 } // namespace tabpose
34
35 class TabStripModel;
36
13 // 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
14 // 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
15 // 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
16 // independent of each other. 40 // independent of each other.
17 @interface TabposeWindow : NSWindow { 41 @interface TabposeWindow : NSWindow {
18 @private 42 @private
43 tabpose::WindowState state_;
44
19 // 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.
20 CALayer* rootLayer_; // weak 46 CALayer* rootLayer_; // weak
21 47
22 // The layer showing the background layer. Covers the whole visible area. 48 // The layer showing the background layer. Covers the whole visible area.
23 CALayer* bgLayer_; // weak 49 CALayer* bgLayer_; // weak
24 50
25 scoped_cftyperef<CGColorRef> gray_; 51 scoped_cftyperef<CGColorRef> gray_;
52
53 TabStripModel* tabStripModel_; // weak
54
55 // Stores all preview layers. The order in here matches the order in
56 // the tabstrip model.
57 scoped_nsobject<NSArray> allLayers_;
58
59 // Manages the state of all layers.
60 scoped_ptr<tabpose::TileSet> tileSet_;
26 } 61 }
27 62
28 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. 63 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area.
29 // If |slomo| is YES, then the appearance animation is shown in slow motion. 64 // If |slomo| is YES, then the appearance animation is shown in slow motion.
30 // The window blocks all keyboard and mouse events and releases itself when 65 // The window blocks all keyboard and mouse events and releases itself when
31 // closed. 66 // closed.
32 + (id)openTabposeFor:(NSWindow*)parent rect:(NSRect)rect slomo:(BOOL)slomo; 67 + (id)openTabposeFor:(NSWindow*)parent
68 rect:(NSRect)rect
69 slomo:(BOOL)slomo
70 tabStripModel:(TabStripModel*)tabStripModel;
33 @end 71 @end
34 72
35 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ 73 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
36
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/tabpose_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698