summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tabpose_window.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 18:32:35 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 18:32:35 +0000
commit91ac92017430d4e2620c90df4db22a8f0b13517b (patch)
tree6609159f6c2fa4542c0825d6e80fab31c2a0fbcd /chrome/browser/cocoa/tabpose_window.h
parentb977787a65182c58cbaea80d4cd30856740a4cde (diff)
downloadchromium_src-91ac92017430d4e2620c90df4db22a8f0b13517b.zip
chromium_src-91ac92017430d4e2620c90df4db22a8f0b13517b.tar.gz
chromium_src-91ac92017430d4e2620c90df4db22a8f0b13517b.tar.bz2
Mac: Add tabpose window
The window doesn't have any contents yet, which makes its appearance look a bit janky for now. BUG=50307 TEST= * All the following happens only if --enable-expose-for-tabs is passed in, else all of it should be disabled. * In a browser window, hit cmd-f10 or three-finger-swipe down. A grey overlay with a gradient at the top should appear. * The overlay should cover tab contents, eventual info bars, the bookmarks bar if it's detached (but not the bookmarks bar if it's not detached), and eventual attached inspector windows. It should not cover the download shelf if it's open. * The window should block clicks on the tab strip and the download shelf for now. * The overlay should close on three-finger-swipe up, click, esc, enter, and space. * Every open browser window should have its own overlay, and they should be independent of each other. * If a browser window with an overlay window is active, most menu items should be greyed out, and all browser-related keyboard shortcuts should be disabled. * In particular, hitting cmd-f10 twice should open only one overlay per browser window * The overlay should have the correct size with a UI scale factor > 1 Review URL: http://codereview.chromium.org/2819070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tabpose_window.h')
-rw-r--r--chrome/browser/cocoa/tabpose_window.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tabpose_window.h b/chrome/browser/cocoa/tabpose_window.h
new file mode 100644
index 0000000..0efb90c
--- /dev/null
+++ b/chrome/browser/cocoa/tabpose_window.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
+#define CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/scoped_cftyperef.h"
+
+// A TabposeWindow shows an overview of open tabs and lets the user select a new
+// active tab. The window blocks clicks on the tab strip and the download
+// shelf. Every open browser window has its own overlay, and they are
+// independent of each other.
+@interface TabposeWindow : NSWindow {
+ @private
+ // The root layer added to the content view. Covers the whole window.
+ CALayer* rootLayer_; // weak
+
+ // The layer showing the background layer. Covers the whole visible area.
+ CALayer* bgLayer_; // weak
+
+ scoped_cftyperef<CGColorRef> gray_;
+}
+
+// Shows a TabposeWindow on top of |parent|, with |rect| being the active area.
+// If |slomo| is YES, then the appearance animation is shown in slow motion.
+// The window blocks all keyboard and mouse events and releases itself when
+// closed.
++ (id)openTabposeFor:(NSWindow*)parent rect:(NSRect)rect slomo:(BOOL)slomo;
+@end
+
+#endif // CHROME_BROWSER_COCOA_TABPOSE_WINDOW_H_
+