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

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

Issue 2976008: Bar (Closed)
Patch Set: '' 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
« 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
11 #include "base/scoped_cftyperef.h" 11 #include "base/scoped_cftyperef.h"
12 12
13 #import <Cocoa/Cocoa.h>
14
15 #include "base/ref_counted.h"
16 #include "base/scoped_nsobject.h"
17 #include "base/scoped_vector.h"
18
19 enum State {
20 kFadingIn,
21 kFadedIn,
22 kFadingOut,
23 };
24
25 @class BrowserWindowController;
26 class TabposeCallback;
27 class TabposeHelper;
28
13 // A TabposeWindow shows an overview of open tabs and lets the user select a new 29 // 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 30 // 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 31 // shelf. Every open browser window has its own overlay, and they are
16 // independent of each other. 32 // independent of each other.
17 @interface TabposeWindow : NSWindow { 33 @interface TabposeWindow : NSWindow {
18 @private 34 @public // FIXME
35 BrowserWindowController* browser_; // weak, "owns" us
36 int selectedIndex_;
37 CALayer* selectedLayer_;
38 State state_;
39
19 // The root layer added to the content view. Covers the whole window. 40 // The root layer added to the content view. Covers the whole window.
20 CALayer* rootLayer_; // weak 41 CALayer* rootLayer_; // weak
21 42
22 // The layer showing the background layer. Covers the whole visible area. 43 // The layer showing the background layer. Covers the whole visible area.
23 CALayer* bgLayer_; // weak 44 CALayer* bgLayer_; // weak
24 45
25 scoped_cftyperef<CGColorRef> gray_; 46 scoped_cftyperef<CGColorRef> gray_;
47
48 int initiallySelectedIndex_;
49
50 int nx, ny, last_nx, w, h;
51 double dx, dy;
52
53 // Stores all preview layers. The order in here matches the order in
54 // the tabstrip model.
55 scoped_nsobject<NSArray> allLayers_;
56
57 scoped_refptr<TabposeHelper> helper_;
58
59 ScopedVector<TabposeCallback> callbacks_;
26 } 60 }
27 61
28 // Shows a TabposeWindow on top of |parent|, with |rect| being the active area. 62 // 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. 63 // 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 64 // The window blocks all keyboard and mouse events and releases itself when
31 // closed. 65 // closed.
32 + (id)openTabposeFor:(NSWindow*)parent rect:(NSRect)rect slomo:(BOOL)slomo; 66 + (id)openTabposeFor:(NSWindow*)parent rect:(NSRect)rect slomo:(BOOL)slomo
67 tempBWC:(BrowserWindowController*)bwc;
33 @end 68 @end
34 69
35 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_ 70 #endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
36
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