| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/cocoa/browser_frame_view.h" | 5 #import "chrome/browser/ui/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/mac/scoped_nsautorelease_pool.h" | 11 #include "base/mac/scoped_nsautorelease_pool.h" |
| 12 #import "chrome/browser/themes/theme_service.h" | 12 #import "chrome/browser/themes/theme_service.h" |
| 13 #import "chrome/browser/ui/cocoa/framed_browser_window.h" | 13 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
| 14 #import "chrome/browser/ui/cocoa/themed_window.h" | 14 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
| 16 #include "grit/theme_resources_standard.h" |
| 16 | 17 |
| 17 static const CGFloat kBrowserFrameViewPaintHeight = 60.0; | 18 static const CGFloat kBrowserFrameViewPaintHeight = 60.0; |
| 18 static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 3 }; | 19 static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 3 }; |
| 19 | 20 |
| 20 static BOOL gCanDrawTitle = NO; | 21 static BOOL gCanDrawTitle = NO; |
| 21 static BOOL gCanGetCornerRadius = NO; | 22 static BOOL gCanGetCornerRadius = NO; |
| 22 | 23 |
| 23 @interface NSView (Swizzles) | 24 @interface NSView (Swizzles) |
| 24 - (void)drawRectOriginal:(NSRect)rect; | 25 - (void)drawRectOriginal:(NSRect)rect; |
| 25 - (BOOL)_mouseInGroup:(NSButton*)widget; | 26 - (BOOL)_mouseInGroup:(NSButton*)widget; |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 391 |
| 391 // If this isn't the window class we expect, then pass it on to the | 392 // If this isn't the window class we expect, then pass it on to the |
| 392 // original implementation. | 393 // original implementation. |
| 393 if (![[self window] isKindOfClass:[FramedBrowserWindow class]]) | 394 if (![[self window] isKindOfClass:[FramedBrowserWindow class]]) |
| 394 return [self _shadowFlagsOriginal]; | 395 return [self _shadowFlagsOriginal]; |
| 395 | 396 |
| 396 return [self _shadowFlagsOriginal] | 128; | 397 return [self _shadowFlagsOriginal] | 128; |
| 397 } | 398 } |
| 398 | 399 |
| 399 @end | 400 @end |
| OLD | NEW |