| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/mac/mac_util.h" | 5 #include "base/mac/mac_util.h" |
| 6 #include "base/mac/sdk_forward_declarations.h" | 6 #include "base/mac/sdk_forward_declarations.h" |
| 7 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 7 #import "ui/base/cocoa/nsview_additions.h" |
| 8 #include "chrome/common/chrome_switches.h" | |
| 9 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 8 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| 10 | 9 |
| 11 #include "base/logging.h" | 10 #include "base/logging.h" |
| 12 | 11 |
| 13 @implementation NSView (ChromeAdditions) | 12 @implementation NSView (ChromeAdditions) |
| 14 | 13 |
| 15 - (CGFloat)cr_lineWidth { | 14 - (CGFloat)cr_lineWidth { |
| 16 // All shipping retina macs run at least 10.7. | 15 // All shipping retina macs run at least 10.7. |
| 17 if (![self respondsToSelector:@selector(convertSizeFromBacking:)]) | 16 if (![self respondsToSelector:@selector(convertSizeFromBacking:)]) |
| 18 return 1; | 17 return 1; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 92 } |
| 94 | 93 |
| 95 - (NSView*)cr_viewBeingDrawnTo { | 94 - (NSView*)cr_viewBeingDrawnTo { |
| 96 if (!g_ancestorBeingDrawnFrom) | 95 if (!g_ancestorBeingDrawnFrom) |
| 97 return self; | 96 return self; |
| 98 DCHECK(g_ancestorBeingDrawnFrom == self); | 97 DCHECK(g_ancestorBeingDrawnFrom == self); |
| 99 return g_childBeingDrawnTo; | 98 return g_childBeingDrawnTo; |
| 100 } | 99 } |
| 101 | 100 |
| 102 @end | 101 @end |
| OLD | NEW |