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

Unified Diff: chrome/browser/cocoa/chrome_browser_window.h

Issue 259023: [Mac] Window titles for Expose. (Closed)
Patch Set: Fix unit_test expectations for Release. Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/chrome_browser_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/chrome_browser_window.h
diff --git a/chrome/browser/cocoa/chrome_browser_window.h b/chrome/browser/cocoa/chrome_browser_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb14b28ae411d003b353aa6e42cffdd461a3acbd
--- /dev/null
+++ b/chrome/browser/cocoa/chrome_browser_window.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2009 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_CHROME_BROWSER_WINDOW_H_
+#define CHROME_BROWSER_COCOA_CHROME_BROWSER_WINDOW_H_
+
+#import <Cocoa/Cocoa.h>
+
+// Cocoa class representing a Chrome browser window.
+// We need to override NSWindow with our own class since we need access to all
+// unhandled keyboard events and subclassing NSWindow is the only method to do
+// this.
+@interface ChromeBrowserWindow : NSWindow {
+ BOOL shouldHideTitle_;
+}
+
+// Override, so we can handle global keyboard events.
+- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
+
+// Tells the window to suppress title drawing.
+- (void)setShouldHideTitle:(BOOL)flag;
+
+@end
+
+@interface ChromeBrowserWindow (UndocumentedAPI)
+
+// Undocumented Cocoa API to suppress drawing of the window's title.
+// -setTitle: still works, but the title set only applies to the
+// miniwindow and menus (and, importantly, Expose). Overridden to
+// return |shouldHideTitle_|.
+-(BOOL)_isTitleHidden;
+
+@end
+
+#endif // CHROME_BROWSER_COCOA_CHROME_BROWSER_WINDOW_H_
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/chrome_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698