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

Side by Side Diff: chrome/browser/ui/cocoa/custom_frame_view.mm

Issue 2288003002: Delete IsAtLeastOS10_9() and IsAtMostOS10_9() (Closed)
Patch Set: Rebase, cancel the more confusing changes Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 #import "chrome/browser/ui/cocoa/custom_frame_view.h" 5 #import "chrome/browser/ui/cocoa/custom_frame_view.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #include <crt_externs.h> 8 #include <crt_externs.h>
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const int argc = *_NSGetArgc(); 43 const int argc = *_NSGetArgc();
44 const char kType[] = "--type="; 44 const char kType[] = "--type=";
45 for (int i = 1; i < argc; ++i) { 45 for (int i = 1; i < argc; ++i) {
46 const char* arg = argv[i]; 46 const char* arg = argv[i];
47 if (strncmp(arg, kType, strlen(kType)) == 0) 47 if (strncmp(arg, kType, strlen(kType)) == 0)
48 return; 48 return;
49 } 49 }
50 50
51 // In Yosemite, the fullscreen button replaces the zoom button. We no longer 51 // In Yosemite, the fullscreen button replaces the zoom button. We no longer
52 // need to swizzle out this AppKit private method. 52 // need to swizzle out this AppKit private method.
53 if (!base::mac::IsOS10_9()) 53 if (base::mac::IsAtLeastOS10_10())
54 return; 54 return;
55 55
56 base::mac::ScopedNSAutoreleasePool pool; 56 base::mac::ScopedNSAutoreleasePool pool;
57 57
58 // On 10.8+ the background for textured windows are no longer drawn by 58 // On 10.8+ the background for textured windows are no longer drawn by
59 // NSGrayFrame, and NSThemeFrame is used instead <http://crbug.com/114745>. 59 // NSGrayFrame, and NSThemeFrame is used instead <http://crbug.com/114745>.
60 Class borderViewClass = NSClassFromString(@"NSThemeFrame"); 60 Class borderViewClass = NSClassFromString(@"NSThemeFrame");
61 DCHECK(borderViewClass); 61 DCHECK(borderViewClass);
62 if (!borderViewClass) return; 62 if (!borderViewClass) return;
63 63
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if ([window respondsToSelector:@selector(fullScreenButtonOriginAdjustment)]) 102 if ([window respondsToSelector:@selector(fullScreenButtonOriginAdjustment)])
103 offset = [window fullScreenButtonOriginAdjustment]; 103 offset = [window fullScreenButtonOriginAdjustment];
104 104
105 NSPoint origin = [self _fullScreenButtonOriginOriginal]; 105 NSPoint origin = [self _fullScreenButtonOriginOriginal];
106 origin.x += offset.x; 106 origin.x += offset.x;
107 origin.y += offset.y; 107 origin.y += offset.y;
108 return origin; 108 return origin;
109 } 109 }
110 110
111 @end 111 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/custom_frame_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698