| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/browser_frame_view.h" | 5 #import "chrome/browser/cocoa/browser_frame_view.h" |
| 6 | 6 |
| 7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 #import <Carbon/Carbon.h> | 8 #import <Carbon/Carbon.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/scoped_nsautorelease_pool.h" | 11 #include "base/scoped_nsautorelease_pool.h" |
| 12 #import "chrome/browser/browser_theme_provider.h" | 12 #import "chrome/browser/browser_theme_provider.h" |
| 13 #import "chrome/browser/cocoa/chrome_browser_window.h" | 13 #import "chrome/browser/cocoa/chrome_browser_window.h" |
| 14 #import "chrome/browser/cocoa/themed_window.h" | 14 #import "chrome/browser/cocoa/themed_window.h" |
| 15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
| 16 | 16 |
| 17 static const CGFloat kBrowserFrameViewPaintHeight = 52.0; | 17 static const CGFloat kBrowserFrameViewPaintHeight = 60.0; |
| 18 static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 3 }; | 18 static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 3 }; |
| 19 | 19 |
| 20 @interface NSView (Swizzles) | 20 @interface NSView (Swizzles) |
| 21 - (void)drawRectOriginal:(NSRect)rect; | 21 - (void)drawRectOriginal:(NSRect)rect; |
| 22 - (BOOL)_mouseInGroup:(NSButton*)widget; | 22 - (BOOL)_mouseInGroup:(NSButton*)widget; |
| 23 - (void)updateTrackingAreas; | 23 - (void)updateTrackingAreas; |
| 24 @end | 24 @end |
| 25 | 25 |
| 26 @implementation BrowserFrameView | 26 @implementation BrowserFrameView |
| 27 | 27 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 - (void)updateTrackingAreas { | 239 - (void)updateTrackingAreas { |
| 240 [super updateTrackingAreas]; | 240 [super updateTrackingAreas]; |
| 241 if ([[self window] isKindOfClass:[ChromeBrowserWindow class]]) { | 241 if ([[self window] isKindOfClass:[ChromeBrowserWindow class]]) { |
| 242 ChromeBrowserWindow* window = | 242 ChromeBrowserWindow* window = |
| 243 static_cast<ChromeBrowserWindow*>([self window]); | 243 static_cast<ChromeBrowserWindow*>([self window]); |
| 244 [window updateTrackingAreas]; | 244 [window updateTrackingAreas]; |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 | 247 |
| 248 @end | 248 @end |
| OLD | NEW |