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

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

Issue 260009: Several background pattern fixes on the Mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' 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/bubble_view.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
===================================================================
--- chrome/browser/cocoa/chrome_browser_window.h (revision 28537)
+++ chrome/browser/cocoa/chrome_browser_window.h (working copy)
@@ -7,12 +7,31 @@
#import <Cocoa/Cocoa.h>
+#include "base/scoped_nsobject.h"
+
+// Offset from the top of the window frame to the top of the window controls
+// (zoom, close, miniaturize).
+const NSInteger kChromeWindowButtonsOffsetFromTop = 7;
+
+// Offset from the left of the window frame to the top of the window controls
+// (zoom, close, miniaturize).
+const NSInteger kChromeWindowButtonsOffsetFromLeft = 8;
+
+// Offset between the window controls (zoom, close, miniaturize).
+const NSInteger kChromeWindowButtonsInterButtonSpacing = 7;
+
// 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.
+// this. We also handle our own window controls and custom window frame drawing.
@interface ChromeBrowserWindow : NSWindow {
+ @private
BOOL shouldHideTitle_;
+ NSButton* closeButton_;
+ NSButton* miniaturizeButton_;
+ NSButton* zoomButton_;
+ BOOL entered_;
+ scoped_nsobject<NSTrackingArea> widgetTrackingArea_;
}
// See global_keyboard_shortcuts_mac.h for details on the next two functions.
@@ -31,6 +50,12 @@
// Tells the window to suppress title drawing.
- (void)setShouldHideTitle:(BOOL)flag;
+// Return true if the mouse is currently in our tracking area for our window
+// widgets.
+- (BOOL)mouseInGroup:(NSButton*)widget;
+
+// Update the tracking areas for our window widgets as appropriate.
+- (void)updateTrackingAreas;
@end
@interface ChromeBrowserWindow (UndocumentedAPI)
Property changes on: chrome/browser/cocoa/chrome_browser_window.h
___________________________________________________________________
Name: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/cocoa/bubble_view.mm ('k') | chrome/browser/cocoa/chrome_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698